From 8bfde271e084dd7b0dabfe6d4af73e4923e361d4 Mon Sep 17 00:00:00 2001 From: Dan Ziemba Date: Sat, 19 Dec 2015 02:33:59 -0500 Subject: [PATCH] Removed patch from 4.4 as it is already included --- .SRCINFO | 4 +- PKGBUILD | 11 +--- ...6_QUIRK_CD_NW_CLEARED-in-kvm_set_cr0.patch | 53 ------------------- 3 files changed, 4 insertions(+), 64 deletions(-) delete mode 100644 kvm-x86-obey-KVM_X86_QUIRK_CD_NW_CLEARED-in-kvm_set_cr0.patch diff --git a/.SRCINFO b/.SRCINFO index 1a41712..89c8f2e 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,3 +1,5 @@ +# Generated by mksrcinfo v8 +# Sat Dec 19 07:32:47 UTC 2015 pkgbase = linux-vfio pkgver = 4.3.3 pkgrel = 1 @@ -21,7 +23,6 @@ pkgbase = linux-vfio source = change-default-console-loglevel.patch source = override_for_missing_acs_capabilities.patch source = i915_317.patch - source = kvm-x86-obey-KVM_X86_QUIRK_CD_NW_CLEARED-in-kvm_set_cr0.patch sha256sums = 4a622cc84b8a3c38d39bc17195b0c064d2b46945dfde0dae18f77b120bc9f3ae sha256sums = SKIP sha256sums = 95cd81fcbb87953f672150d60950548edc04a88474c42de713b91811557fefa5 @@ -32,7 +33,6 @@ pkgbase = linux-vfio sha256sums = 1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99 sha256sums = 975f79348119bfba8dd972a9fbfe6b38484c45bfd228f2f6d48a0c02426ba149 sha256sums = ff2bb84f054633c6088ad31b450b7b96b5f4ee18667dd56772dff1d8c1687854 - sha256sums = 2d8bf50218cff86db6723f3623823a47b1c8299a2eb0589458b0a19887799f4e pkgname = linux-vfio pkgdesc = The Linux kernel and modules with patches to enable GPU passthrough with KVM diff --git a/PKGBUILD b/PKGBUILD index dafc949..f6a3ee9 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -19,9 +19,7 @@ source=("https://www.kernel.org/pub/linux/kernel/v4.x/${_srcname}.tar.xz" 'linux.preset' 'change-default-console-loglevel.patch' 'override_for_missing_acs_capabilities.patch' - 'i915_317.patch' - 'kvm-x86-obey-KVM_X86_QUIRK_CD_NW_CLEARED-in-kvm_set_cr0.patch' - ) + 'i915_317.patch') sha256sums=('4a622cc84b8a3c38d39bc17195b0c064d2b46945dfde0dae18f77b120bc9f3ae' 'SKIP' '95cd81fcbb87953f672150d60950548edc04a88474c42de713b91811557fefa5' @@ -31,8 +29,7 @@ sha256sums=('4a622cc84b8a3c38d39bc17195b0c064d2b46945dfde0dae18f77b120bc9f3ae' 'f0d90e756f14533ee67afda280500511a62465b4f76adcc5effa95a40045179c' '1256b241cd477b265a3c2d64bdc19ffe3c9bbcee82ea3994c590c2c76e767d99' '975f79348119bfba8dd972a9fbfe6b38484c45bfd228f2f6d48a0c02426ba149' - 'ff2bb84f054633c6088ad31b450b7b96b5f4ee18667dd56772dff1d8c1687854' - '2d8bf50218cff86db6723f3623823a47b1c8299a2eb0589458b0a19887799f4e') + 'ff2bb84f054633c6088ad31b450b7b96b5f4ee18667dd56772dff1d8c1687854') validpgpkeys=( 'ABAF11C65A2970B130ABE3C479BE3E4300411886' # Linus Torvalds '647F28654894E3BD457199BE38DBBDC86092693E' # Greg Kroah-Hartman @@ -68,10 +65,6 @@ prepare() { echo '==> Applying ACS override 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 sed -i "s|CONFIG_LOCALVERSION=.*|CONFIG_LOCALVERSION=\"${_kernelname}\"|g" ./.config sed -i "s|CONFIG_LOCALVERSION_AUTO=.*|CONFIG_LOCALVERSION_AUTO=n|" ./.config diff --git a/kvm-x86-obey-KVM_X86_QUIRK_CD_NW_CLEARED-in-kvm_set_cr0.patch b/kvm-x86-obey-KVM_X86_QUIRK_CD_NW_CLEARED-in-kvm_set_cr0.patch deleted file mode 100644 index 64cdd6b..0000000 --- a/kvm-x86-obey-KVM_X86_QUIRK_CD_NW_CLEARED-in-kvm_set_cr0.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 879ae1880449c88db11c1ebdaedc2da79b2fe73f Mon Sep 17 00:00:00 2001 -From: Laszlo Ersek -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 -Cc: Alex Williamson -Reviewed-by: Xiao Guangrong -Tested-by: Janusz Mocek -Signed-off-by: Laszlo Ersek # -Signed-off-by: Paolo Bonzini ---- - 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 -