mbox series

[v3,0/2] kvm/cpuid: set proper GuestPhysBits in CPUID.0x80000008

Message ID 20240311104118.284054-1-kraxel@redhat.com (mailing list archive)
Headers show
Series kvm/cpuid: set proper GuestPhysBits in CPUID.0x80000008 | expand

Message

Gerd Hoffmann March 11, 2024, 10:41 a.m. UTC
Use the GuestPhysBits field (EAX[23:16]) to communicate the max
addressable GPA to the guest.  Typically this is identical to the max
effective GPA, except in case the CPU supports MAXPHYADDR > 48 but does
not support 5-level TDP.

See commit messages and source code comments for details.

Gerd Hoffmann (2):
  kvm/cpuid: remove GuestPhysBits code.
  kvm/cpuid: set proper GuestPhysBits in CPUID.0x80000008

 arch/x86/kvm/mmu.h     |  2 ++
 arch/x86/kvm/cpuid.c   | 53 ++++++++++++++++++++++++++++++------------
 arch/x86/kvm/mmu/mmu.c |  5 ++++
 3 files changed, 45 insertions(+), 15 deletions(-)