]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
drop queue-5.6/kvm-x86-use-kvm-cpu-capabilities-to-determine-cr4-reserved-bits.patch
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 May 2020 16:18:49 +0000 (18:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 May 2020 16:18:49 +0000 (18:18 +0200)
queue-5.6/kvm-x86-use-kvm-cpu-capabilities-to-determine-cr4-reserved-bits.patch [deleted file]
queue-5.6/series

diff --git a/queue-5.6/kvm-x86-use-kvm-cpu-capabilities-to-determine-cr4-reserved-bits.patch b/queue-5.6/kvm-x86-use-kvm-cpu-capabilities-to-determine-cr4-reserved-bits.patch
deleted file mode 100644 (file)
index a3ec5c8..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-From 139f7425fdf54f054463e7524b9f54c41af8407f Mon Sep 17 00:00:00 2001
-From: Paolo Bonzini <pbonzini@redhat.com>
-Date: Tue, 5 May 2020 09:40:46 -0400
-Subject: kvm: x86: Use KVM CPU capabilities to determine CR4 reserved bits
-
-From: Paolo Bonzini <pbonzini@redhat.com>
-
-commit 139f7425fdf54f054463e7524b9f54c41af8407f upstream.
-
-Using CPUID data can be useful for the processor compatibility
-check, but that's it.  Using it to compute guest-reserved bits
-can have both false positives (such as LA57 and UMIP which we
-are already handling) and false negatives: in particular, with
-this patch we don't allow anymore a KVM guest to set CR4.PKE
-when CR4.PKE is clear on the host.
-
-Fixes: b9dd21e104bc ("KVM: x86: simplify handling of PKRU")
-Reported-by: Jim Mattson <jmattson@google.com>
-Tested-by: Jim Mattson <jmattson@google.com>
-Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
-diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
-index c5835f9cb9ad..8d296e3d0d56 100644
---- a/arch/x86/kvm/x86.c
-+++ b/arch/x86/kvm/x86.c
-@@ -926,19 +926,6 @@ EXPORT_SYMBOL_GPL(kvm_set_xcr);
-       __reserved_bits;                                \
- })
--static u64 kvm_host_cr4_reserved_bits(struct cpuinfo_x86 *c)
--{
--      u64 reserved_bits = __cr4_reserved_bits(cpu_has, c);
--
--      if (kvm_cpu_cap_has(X86_FEATURE_LA57))
--              reserved_bits &= ~X86_CR4_LA57;
--
--      if (kvm_cpu_cap_has(X86_FEATURE_UMIP))
--              reserved_bits &= ~X86_CR4_UMIP;
--
--      return reserved_bits;
--}
--
- static int kvm_valid_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)
- {
-       if (cr4 & cr4_reserved_bits)
-@@ -9675,7 +9662,9 @@ int kvm_arch_hardware_setup(void *opaque)
-       if (!kvm_cpu_cap_has(X86_FEATURE_XSAVES))
-               supported_xss = 0;
--      cr4_reserved_bits = kvm_host_cr4_reserved_bits(&boot_cpu_data);
-+#define __kvm_cpu_cap_has(UNUSED_, f) kvm_cpu_cap_has(f)
-+      cr4_reserved_bits = __cr4_reserved_bits(__kvm_cpu_cap_has, UNUSED_);
-+#undef __kvm_cpu_cap_has
-       if (kvm_has_tsc_control) {
-               /*
-@@ -9707,7 +9696,8 @@ int kvm_arch_check_processor_compat(void *opaque)
-       WARN_ON(!irqs_disabled());
--      if (kvm_host_cr4_reserved_bits(c) != cr4_reserved_bits)
-+      if (__cr4_reserved_bits(cpu_has, c) !=
-+          __cr4_reserved_bits(cpu_has, &boot_cpu_data))
-               return -EIO;
-       return ops->check_processor_compatibility();
index bcdd2431fdbf53085f4d7a5e54b9a00337d4bf19..485932b4344fdefcb24ca1e844d80a44033a90c1 100644 (file)
@@ -111,6 +111,5 @@ objtool-fix-stack-offset-tracking-for-indirect-cfas.patch
 iommu-virtio-reverse-arguments-to-list_add.patch
 scripts-decodecode-fix-trapping-instruction-formatting.patch
 mm-memcg-fix-error-return-value-of-mem_cgroup_css_alloc.patch
-kvm-x86-use-kvm-cpu-capabilities-to-determine-cr4-reserved-bits.patch
 bdi-move-bdi_dev_name-out-of-line.patch
 bdi-add-a-dev_name-field-to-struct-backing_dev_info.patch