]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/i386: do not rely on ExtSaveArea for accelerator-supported XCR0 bits
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 31 Oct 2024 08:52:27 +0000 (16:52 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 31 Oct 2024 17:28:33 +0000 (18:28 +0100)
commitb888c7807049cc044d10d70139cb945202fb7cd2
treeb82b69ad32c8b6a2057a835f5fb67fb9385a5365
parent33098002a838a0450f243f5e17463aca700e923d
target/i386: do not rely on ExtSaveArea for accelerator-supported XCR0 bits

Right now, QEMU is using the "feature" and "bits" fields of ExtSaveArea
to query the accelerator for the support status of extended save areas.
This is a problem for AVX10, which attaches two feature bits (AVX512F
and AVX10) to the same extended save states.

To keep the AVX10 hacks to the minimum, limit usage of esa->features
and esa->bits.  Instead, just query the accelerator for the 0xD leaf.
Do it in common code and clear esa->size if an extended save state is
unsupported.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20241031085233.425388-3-tao1.su@linux.intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.c
target/i386/kvm/kvm-cpu.c