]> git.ipfire.org Git - thirdparty/qemu.git/commit
kvm: add support for guest physical bits
authorGerd Hoffmann <kraxel@redhat.com>
Mon, 18 Mar 2024 15:53:35 +0000 (16:53 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 18 Apr 2024 09:17:28 +0000 (11:17 +0200)
commit0d08c423688edcca857f88dab20f1fc56de2b281
treedb0a0181bba3e524187fcad8f823abad222c1187
parent513ba32dccc659c80722b3a43233b26eaa50309a
kvm: add support for guest physical bits

Query kvm for supported guest physical address bits, in cpuid
function 80000008, eax[23:16].  Usually this is identical to host
physical address bits.  With NPT or EPT being used this might be
restricted to 48 (max 4-level paging address space size) even if
the host cpu supports more physical address bits.

When set pass this to the guest, using cpuid too.  Guest firmware
can use this to figure how big the usable guest physical address
space is, so PCI bar mapping are actually reachable.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-ID: <20240318155336.156197-2-kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/kvm/kvm-cpu.c