qemu/target
Paolo Bonzini 7cac7aa704 target/i386/hvf: fix handling of XSAVE-related CPUID bits
The call to xgetbv() is passing the ecx value for cpuid function 0xD,
index 0. The xgetbv call thus returns false (OSXSAVE is bit 27, which is
well out of the range of CPUID[0xD,0].ECX) and eax is not modified. While
fixing it, cache the whole computation of supported XCR0 bits since it
will be used for more than just CPUID leaf 0xD.

Furthermore, unsupported subleafs of CPUID 0xD (including all those
corresponding to zero bits in host's XCR0) must be hidden; if OSXSAVE
is not set at all, the whole of CPUID leaf 0xD plus the XSAVE bit must
be hidden.

Finally, unconditionally drop XSTATE_BNDREGS_MASK and XSTATE_BNDCSR_MASK;
real hardware will only show them if the MPX bit is set in CPUID;
this is never the case for hvf_get_supported_cpuid() because QEMU's
Hypervisor.framework support does not handle the VMX fields related to
MPX (even in the unlikely possibility that the host has MPX enabled).
So hide those bits in the new cache_host_xcr0().

Cc: Phil Dennis-Jordan <lists@philjordan.eu>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2024-10-31 18:28:32 +01:00
..
alpha target/alpha: Use explicit little-endian LD/ST API 2024-10-15 11:55:09 -03:00
arm target/arm: Fix alignment fault priority in get_phys_addr_lpae 2024-10-13 11:27:06 -07:00
avr target/avr: Use explicit little-endian LD/ST API 2024-10-15 12:13:59 -03:00
hexagon target/hexagon: Use explicit little-endian LD/ST API 2024-10-15 11:55:09 -03:00
hppa target/hppa: Implement TCGCPUOps.tlb_fill_align 2024-10-13 11:27:05 -07:00
i386 target/i386/hvf: fix handling of XSAVE-related CPUID bits 2024-10-31 18:28:32 +01:00
loongarch pull-loongarch-20241016 2024-10-17 12:42:23 +01:00
m68k target/m68k: Always return a temporary from gen_lea_mode 2024-10-08 06:40:31 -07:00
microblaze license: Update deprecated SPDX tag LGPL-2.0+ to LGPL-2.0-or-later 2024-09-20 10:11:59 +03:00
mips hw/mips: Have mips_cpu_create_with_clock() take an endianness argument 2024-10-15 12:21:06 -03:00
openrisc license: Update deprecated SPDX tag LGPL-2.0+ to LGPL-2.0-or-later 2024-09-20 10:11:59 +03:00
ppc target/ppc: Use tcg_constant_tl() instead of tcg_gen_movi_tl() 2024-10-15 12:13:59 -03:00
riscv * pc: Add a description for the i8042 property 2024-10-04 19:28:37 +01:00
rx target/rx: Use target_ulong for address in LI 2024-07-28 14:13:05 +10:00
s390x s390x: Rebuild IPLB for SCSI device directly from DIAG308 2024-10-23 06:53:44 +02:00
sh4 license: Update deprecated SPDX tag LGPL-2.0+ to LGPL-2.0-or-later 2024-09-20 10:11:59 +03:00
sparc license: Update deprecated SPDX tag LGPL-2.0+ to LGPL-2.0-or-later 2024-09-20 10:11:59 +03:00
tricore target/tricore: Use tcg_constant_tl() instead of tcg_gen_movi_tl() 2024-10-15 12:13:59 -03:00
xtensa include/exec/memop: Rename get_alignment_bits 2024-10-13 11:27:03 -07:00
Kconfig target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00
meson.build target/cris: Remove the deprecated CRIS target 2024-09-13 20:11:13 +02:00