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. v4 changes: - comment fixups. - picked up reviewed-by tags, 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 | 41 +++++++++++++++++++++++++++++++---------- arch/x86/kvm/mmu/mmu.c | 5 +++++ 3 files changed, 38 insertions(+), 10 deletions(-) -- 2.44.0