KVM: x86: bit 8 of non-leaf PDPEs is not reserved
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 30 Jun 2020 11:07:20 +0000 (07:07 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 16 Jul 2020 06:13:28 +0000 (08:13 +0200)
commit8d5ebb33c7b2ccca03e6f82c62e76c6d1afe6958
tree28179f655dd06997c083a12c9cc17ac193138112
parentca37cecd9dca22db76de95583d2280ddee4ffc07
KVM: x86: bit 8 of non-leaf PDPEs is not reserved

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/mmu.c