]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Jul 2020 16:16:28 +0000 (18:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Jul 2020 16:16:28 +0000 (18:16 +0200)
added patches:
kvm-x86-bit-8-of-non-leaf-pdpes-is-not-reserved.patch

queue-4.4/kvm-x86-bit-8-of-non-leaf-pdpes-is-not-reserved.patch [new file with mode: 0644]
queue-4.4/series

diff --git a/queue-4.4/kvm-x86-bit-8-of-non-leaf-pdpes-is-not-reserved.patch b/queue-4.4/kvm-x86-bit-8-of-non-leaf-pdpes-is-not-reserved.patch
new file mode 100644 (file)
index 0000000..eab8e7c
--- /dev/null
@@ -0,0 +1,37 @@
+From 5ecad245de2ae23dc4e2dbece92f8ccfbaed2fa7 Mon Sep 17 00:00:00 2001
+From: Paolo Bonzini <pbonzini@redhat.com>
+Date: Tue, 30 Jun 2020 07:07:20 -0400
+Subject: KVM: x86: bit 8 of non-leaf PDPEs is not reserved
+
+From: Paolo Bonzini <pbonzini@redhat.com>
+
+commit 5ecad245de2ae23dc4e2dbece92f8ccfbaed2fa7 upstream.
+
+Bit 8 would be the "global" bit, which does not quite make sense for non-leaf
+page table entries.  Intel ignores it; AMD ignores it in PDEs and PDPEs, but
+reserves it in PML4Es.
+
+Probably, earlier versions of the AMD manual documented it as reserved in PDPEs
+as well, and that behavior made it into KVM as well as kvm-unit-tests; fix it.
+
+Cc: stable@vger.kernel.org
+Reported-by: Nadav Amit <namit@vmware.com>
+Fixes: a0c0feb57992 ("KVM: x86: reserve bit 8 of non-leaf PDPEs and PML4Es in 64-bit mode on AMD", 2014-09-03)
+Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ arch/x86/kvm/mmu.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/x86/kvm/mmu.c
++++ b/arch/x86/kvm/mmu.c
+@@ -3679,7 +3679,7 @@ __reset_rsvds_bits_mask(struct kvm_vcpu
+                       nonleaf_bit8_rsvd | rsvd_bits(7, 7) |
+                       rsvd_bits(maxphyaddr, 51);
+               rsvd_check->rsvd_bits_mask[0][2] = exb_bit_rsvd |
+-                      nonleaf_bit8_rsvd | gbpages_bit_rsvd |
++                      gbpages_bit_rsvd |
+                       rsvd_bits(maxphyaddr, 51);
+               rsvd_check->rsvd_bits_mask[0][1] = exb_bit_rsvd |
+                       rsvd_bits(maxphyaddr, 51);
index 6d65332f97545fafb6e7c28206648134d0e519f1..dc8021414d4b6d5b40f62ae07b760c0c1758a67c 100644 (file)
@@ -10,3 +10,4 @@ arm64-kgdb-fix-single-step-exception-handling-oops.patch
 alsa-opl3-fix-infoleak-in-opl3.patch
 alsa-hda-let-hs_mic-be-picked-ahead-of-hp_mic.patch
 alsa-usb-audio-add-quirk-for-macrosilicon-ms2109.patch
+kvm-x86-bit-8-of-non-leaf-pdpes-is-not-reserved.patch