mirror of
https://aur.archlinux.org/linux-vfio.git
synced 2024-12-27 07:44:11 +00:00
Removed patch from 4.4 as it is already included
This commit is contained in:
parent
52c5edafc6
commit
8bfde271e0
4
.SRCINFO
4
.SRCINFO
@ -1,3 +1,5 @@
|
|||||||
|
# Generated by mksrcinfo v8
|
||||||
|
# Sat Dec 19 07:32:47 UTC 2015
|
||||||
pkgbase = linux-vfio
|
pkgbase = linux-vfio
|
||||||
pkgver = 4.3.3
|
pkgver = 4.3.3
|
||||||
pkgrel = 1
|
pkgrel = 1
|
||||||
@ -21,7 +23,6 @@ pkgbase = linux-vfio
|
|||||||
source = change-default-console-loglevel.patch
|
source = change-default-console-loglevel.patch
|
||||||
source = override_for_missing_acs_capabilities.patch
|
source = override_for_missing_acs_capabilities.patch
|
||||||
source = i915_317.patch
|
source = i915_317.patch
|
||||||
source = kvm-x86-obey-KVM_X86_QUIRK_CD_NW_CLEARED-in-kvm_set_cr0.patch
|
|
||||||
sha256sums = 4a622cc84b8a3c38d39bc17195b0c064d2b46945dfde0dae18f77b120bc9f3ae
|
sha256sums = 4a622cc84b8a3c38d39bc17195b0c064d2b46945dfde0dae18f77b120bc9f3ae
|
||||||
sha256sums = SKIP
|
sha256sums = SKIP
|
||||||
sha256sums = 95cd81fcbb87953f672150d60950548edc04a88474c42de713b91811557fefa5
|
sha256sums = 95cd81fcbb87953f672150d60950548edc04a88474c42de713b91811557fefa5
|
||||||
@ -32,7 +33,6 @@ pkgbase = linux-vfio
|
|||||||
sha256sums = 1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99
|
sha256sums = 1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99
|
||||||
sha256sums = 975f79348119bfba8dd972a9fbfe6b38484c45bfd228f2f6d48a0c02426ba149
|
sha256sums = 975f79348119bfba8dd972a9fbfe6b38484c45bfd228f2f6d48a0c02426ba149
|
||||||
sha256sums = ff2bb84f054633c6088ad31b450b7b96b5f4ee18667dd56772dff1d8c1687854
|
sha256sums = ff2bb84f054633c6088ad31b450b7b96b5f4ee18667dd56772dff1d8c1687854
|
||||||
sha256sums = 2d8bf50218cff86db6723f3623823a47b1c8299a2eb0589458b0a19887799f4e
|
|
||||||
|
|
||||||
pkgname = linux-vfio
|
pkgname = linux-vfio
|
||||||
pkgdesc = The Linux kernel and modules with patches to enable GPU passthrough with KVM
|
pkgdesc = The Linux kernel and modules with patches to enable GPU passthrough with KVM
|
||||||
|
11
PKGBUILD
11
PKGBUILD
@ -19,9 +19,7 @@ source=("https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz"
|
|||||||
'linux.preset'
|
'linux.preset'
|
||||||
'change-default-console-loglevel.patch'
|
'change-default-console-loglevel.patch'
|
||||||
'override_for_missing_acs_capabilities.patch'
|
'override_for_missing_acs_capabilities.patch'
|
||||||
'i915_317.patch'
|
'i915_317.patch')
|
||||||
'kvm-x86-obey-KVM_X86_QUIRK_CD_NW_CLEARED-in-kvm_set_cr0.patch'
|
|
||||||
)
|
|
||||||
sha256sums=('4a622cc84b8a3c38d39bc17195b0c064d2b46945dfde0dae18f77b120bc9f3ae'
|
sha256sums=('4a622cc84b8a3c38d39bc17195b0c064d2b46945dfde0dae18f77b120bc9f3ae'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'95cd81fcbb87953f672150d60950548edc04a88474c42de713b91811557fefa5'
|
'95cd81fcbb87953f672150d60950548edc04a88474c42de713b91811557fefa5'
|
||||||
@ -31,8 +29,7 @@ sha256sums=('4a622cc84b8a3c38d39bc17195b0c064d2b46945dfde0dae18f77b120bc9f3ae'
|
|||||||
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
|
'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c'
|
||||||
'1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
|
'1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99'
|
||||||
'975f79348119bfba8dd972a9fbfe6b38484c45bfd228f2f6d48a0c02426ba149'
|
'975f79348119bfba8dd972a9fbfe6b38484c45bfd228f2f6d48a0c02426ba149'
|
||||||
'ff2bb84f054633c6088ad31b450b7b96b5f4ee18667dd56772dff1d8c1687854'
|
'ff2bb84f054633c6088ad31b450b7b96b5f4ee18667dd56772dff1d8c1687854')
|
||||||
'2d8bf50218cff86db6723f3623823a47b1c8299a2eb0589458b0a19887799f4e')
|
|
||||||
validpgpkeys=(
|
validpgpkeys=(
|
||||||
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
|
'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds
|
||||||
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
|
'647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman
|
||||||
@ -68,10 +65,6 @@ prepare() {
|
|||||||
echo '==> Applying ACS override patch'
|
echo '==> Applying ACS override patch'
|
||||||
patch -p1 -i "${srcdir}/override_for_missing_acs_capabilities.patch"
|
patch -p1 -i "${srcdir}/override_for_missing_acs_capabilities.patch"
|
||||||
|
|
||||||
# Backport of 879ae1880449 from 4.4 to fix booting with OVMF
|
|
||||||
echo '==> Applying OVMF kvm boot patch'
|
|
||||||
patch -p1 -i "${srcdir}/kvm-x86-obey-KVM_X86_QUIRK_CD_NW_CLEARED-in-kvm_set_cr0.patch"
|
|
||||||
|
|
||||||
if [ "${_kernelname}" != "" ]; then
|
if [ "${_kernelname}" != "" ]; then
|
||||||
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
|
sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config
|
||||||
sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config
|
sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config
|
||||||
|
@ -1,53 +0,0 @@
|
|||||||
From 879ae1880449c88db11c1ebdaedc2da79b2fe73f Mon Sep 17 00:00:00 2001
|
|
||||||
From: Laszlo Ersek <lersek@redhat.com>
|
|
||||||
Date: Wed, 4 Nov 2015 12:54:41 +0100
|
|
||||||
Subject: KVM: x86: obey KVM_X86_QUIRK_CD_NW_CLEARED in kvm_set_cr0()
|
|
||||||
|
|
||||||
Commit b18d5431acc7 ("KVM: x86: fix CR0.CD virtualization") was
|
|
||||||
technically correct, but it broke OVMF guests by slowing down various
|
|
||||||
parts of the firmware.
|
|
||||||
|
|
||||||
Commit fb279950ba02 ("KVM: vmx: obey KVM_QUIRK_CD_NW_CLEARED") quirked the
|
|
||||||
first function modified by b18d5431acc7, vmx_get_mt_mask(), for OVMF's
|
|
||||||
sake. This restored the speed of the OVMF code that runs before
|
|
||||||
PlatformPei (including the memory intensive LZMA decompression in SEC).
|
|
||||||
|
|
||||||
This patch extends the quirk to the second function modified by
|
|
||||||
b18d5431acc7, kvm_set_cr0(). It eliminates the intrusive slowdown that
|
|
||||||
hits the EFI_MP_SERVICES_PROTOCOL implementation of edk2's
|
|
||||||
UefiCpuPkg/CpuDxe -- which is built into OVMF --, when CpuDxe starts up
|
|
||||||
all APs at once for initialization, in order to count them.
|
|
||||||
|
|
||||||
We also carry over the kvm_arch_has_noncoherent_dma() sub-condition from
|
|
||||||
the other half of the original commit b18d5431acc7.
|
|
||||||
|
|
||||||
Fixes: b18d5431acc7a2fd22767925f3a6f597aa4bd29e
|
|
||||||
Cc: stable@vger.kernel.org
|
|
||||||
Cc: Jordan Justen <jordan.l.justen@intel.com>
|
|
||||||
Cc: Alex Williamson <alex.williamson@redhat.com>
|
|
||||||
Reviewed-by: Xiao Guangrong <guangrong.xiao@linux.intel.com>
|
|
||||||
Tested-by: Janusz Mocek <januszmk6@gmail.com>
|
|
||||||
Signed-off-by: Laszlo Ersek <lersek@redhat.com>#
|
|
||||||
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
||||||
---
|
|
||||||
arch/x86/kvm/x86.c | 4 +++-
|
|
||||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
|
|
||||||
index a24bae0..30723a4 100644
|
|
||||||
--- a/arch/x86/kvm/x86.c
|
|
||||||
+++ b/arch/x86/kvm/x86.c
|
|
||||||
@@ -625,7 +625,9 @@ int kvm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0)
|
|
||||||
if ((cr0 ^ old_cr0) & update_bits)
|
|
||||||
kvm_mmu_reset_context(vcpu);
|
|
||||||
|
|
||||||
- if ((cr0 ^ old_cr0) & X86_CR0_CD)
|
|
||||||
+ if (((cr0 ^ old_cr0) & X86_CR0_CD) &&
|
|
||||||
+ kvm_arch_has_noncoherent_dma(vcpu->kvm) &&
|
|
||||||
+ !kvm_check_has_quirk(vcpu->kvm, KVM_X86_QUIRK_CD_NW_CLEARED))
|
|
||||||
kvm_zap_gfn_range(vcpu->kvm, 0, ~0ULL);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
--
|
|
||||||
cgit v0.11.2
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user