On 22/7/26 14:04, Cédric Le Goater wrote:
On AMD EPYC processors, raw CPUID leaf 0x80000008 reports 52 physical address bits. When a machine type such as microvm forces host_phys_bits=true, the CPU ends up with phys_bits=52, causing MAKE_64BIT_MASK(52, 0) to shift by 64 — which is undefined behavior.Fix by only computing the mask when phys_bits < 52. Fixes: fcc35e7ccaed ("target-i386: Fill high bits of mtrr mask") Signed-off-by: Cédric Le Goater <[email protected]> --- target/i386/kvm/kvm.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
