]> git.proxmox.com Git - mirror_ubuntu-eoan-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)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 16 Mar 2020 11:27:30 +0000 (12:27 +0100)
commit2ee62e8143298ed815b9c96c96cf3ee6c73e3285
treea6c23d262668cdce3ce91be9611575d75c4f06d1
parent50c4e9b52659f4f219cd4e0de555c5f79207eb66
KVM: x86: use CPUID to locate host page table reserved bits

BugLink: https://bugs.launchpad.net/bugs/1867051
[ Upstream commit 7adacf5eb2d2048045d9fd8fdab861fd9e7e2e96 ]

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: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/x86/kvm/mmu.c