]> git.baikalelectronics.ru Git - kernel.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)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Jan 2020 16:33:12 +0000 (17:33 +0100)
commitbfdf8196dc0213a42ce51aef664057cb39f32663
treebd7de712b726a307d666a1877c9ce3be3caf9e10
parentcdc2320cbb59dea44aae73acf1819cf7501d06d3
KVM: x86: use CPUID to locate host page table reserved bits

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