]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: x86: Add AVX support to the emulator's register fetch and writeback
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Nov 2025 00:36:30 +0000 (19:36 -0500)
committerSean Christopherson <seanjc@google.com>
Wed, 19 Nov 2025 22:30:54 +0000 (14:30 -0800)
commit4cb21be4c3b0cb6248da1dcc4f19f05d3443a235
tree58fe8e5dc1f0d3f600815fdef566bb53aa44490f
parentf106797f81d633010e6795e34871a31883c9791f
KVM: x86: Add AVX support to the emulator's register fetch and writeback

Prepare struct operand for hosting AVX registers.  Remove the
existing, incomplete code that placed the Avx flag in the operand
alignment field, and repurpose the name for a separate bit that
indicates:

- after decode, whether an instruction supports the VEX prefix;

- before writeback, that the instruction did have the VEX prefix and
therefore 1) it can have op_bytes == 32; 2) t should clear high
bytes of XMM registers.

Right now the bit will never be set and the patch has no intended
functional change.  However, this is actually more vexing than the
decoder changes itself, and therefore worth separating.

Co-developed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Link: https://patch.msgid.link/20251114003633.60689-8-pbonzini@redhat.com
[sean: guard ymm[8-15] accesses with #ifdef CONFIG_X86_64]
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/emulate.c
arch/x86/kvm/fpu.h
arch/x86/kvm/kvm_emulate.h