]> www.infradead.org Git - users/dwmw2/linux.git/commit
KVM: x86: use CPUID to locate host page table reserved bits
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 4 Dec 2019 14:50:27 +0000 (15:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2020 12:37:10 +0000 (04:37 -0800)
commitc6a896bb83afabcf0b3f76199cc47de1ff6a647e
tree29f288d252971e4d527adfbb167951d266e74eca
parent06b34107899d1b004462c9d2e52ff5a146ee9898
KVM: x86: use CPUID to locate host page table reserved bits

commit 7adacf5eb2d2048045d9fd8fdab861fd9e7e2e96 upstream.

The comment in kvm_get_shadow_phys_bits refers to MKTME, but the same is actually
true of SME and SEV.  Just use CPUID[0x8000_0008].EAX[7:0] unconditionally if
available, it is simplest and works even if memory is not encrypted.

Cc: stable@vger.kernel.org
Reported-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kvm/mmu/mmu.c