public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] KVM: emulate: enable AVX moves
@ 2025-11-14  0:36 Paolo Bonzini
  2025-11-14  0:36 ` [PATCH 01/10] KVM: emulate: add MOVNTDQA Paolo Bonzini
                   ` (12 more replies)
  0 siblings, 13 replies; 22+ messages in thread
From: Paolo Bonzini @ 2025-11-14  0:36 UTC (permalink / raw)
  To: linux-kernel, kvm; +Cc: kbusch, chang.seok.bae

Over a year ago, Keith Busch posted an RFC patch to enable VMOVDQA
and VMOVDQU instructions in the KVM emulator.  The reason to do so
is that people are using QEMU to emulate fancy devices whose drivers
use those instructions with BARs that, on real hardware, would
presumably support write combining.  These same people obviously
would appreciate being able to use KVM instead of emulation, hence
the request.

The original patch was not bad at all, but missed a few details:

- checking in XCR0 if AVX is enabled (which also protects against
  *hosts* with AVX disabled)

- 32-bit support

- clearing the high bytes of AVX registers if VEX.L=0

- checking some invalid prefix combinations

The ugly parts are in patch 7, which has to juggle the fact that the
same instruction can decode to SSE and AVX, and we only know which are
valid after all the groups are handled.

While at it I also included a small refactoring taken out of the
APX series, by Chang S. Bae, some cleanups, and an extra MOVNTDQ
instruction.

Paolo

Chang S. Bae (1):
  KVM: x86: Refactor REX prefix handling in instruction emulation

Paolo Bonzini (9):
  KVM: emulate: add MOVNTDQA
  KVM: emulate: move Src2Shift up one bit
  KVM: emulate: improve formatting of flags table
  KVM: emulate: move op_prefix to struct x86_emulate_ctxt
  KVM: emulate: share common register decoding code
  KVM: emulate: add get_xcr callback
  KVM: emulate: add AVX support to register fetch and writeback
  KVM: emulate: decode VEX prefix
  KVM: emulate: enable AVX moves

 arch/x86/kvm/emulate.c     | 320 ++++++++++++++++++++++++++-----------
 arch/x86/kvm/fpu.h         |  62 +++++++
 arch/x86/kvm/kvm_emulate.h |  20 ++-
 arch/x86/kvm/x86.c         |   9 ++
 4 files changed, 311 insertions(+), 100 deletions(-)

-- 
2.43.5


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2025-11-21 18:56 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-14  0:36 [PATCH 00/10] KVM: emulate: enable AVX moves Paolo Bonzini
2025-11-14  0:36 ` [PATCH 01/10] KVM: emulate: add MOVNTDQA Paolo Bonzini
2025-11-14  0:36 ` [PATCH 02/10] KVM: emulate: move Src2Shift up one bit Paolo Bonzini
2025-11-17 19:51   ` Chang S. Bae
2025-11-14  0:36 ` [PATCH 03/10] KVM: emulate: improve formatting of flags table Paolo Bonzini
2025-11-17 19:53   ` Chang S. Bae
2025-11-14  0:36 ` [PATCH 04/10] KVM: emulate: move op_prefix to struct x86_emulate_ctxt Paolo Bonzini
2025-11-17 19:54   ` Chang S. Bae
2025-11-14  0:36 ` [PATCH 05/10] KVM: emulate: share common register decoding code Paolo Bonzini
2025-11-17 19:55   ` Chang S. Bae
2025-11-14  0:36 ` [PATCH 06/10] KVM: emulate: add get_xcr callback Paolo Bonzini
2025-11-17 19:56   ` Chang S. Bae
2025-11-14  0:36 ` [PATCH 07/10] KVM: emulate: add AVX support to register fetch and writeback Paolo Bonzini
2025-11-14 17:06   ` kernel test robot
2025-11-14 20:10   ` kernel test robot
2025-11-14  0:36 ` [PATCH 08/10] KVM: x86: Refactor REX prefix handling in instruction emulation Paolo Bonzini
2025-11-17 19:56   ` Chang S. Bae
2025-11-14  0:36 ` [PATCH 09/10] KVM: emulate: decode VEX prefix Paolo Bonzini
2025-11-14  0:36 ` [PATCH 10/10] KVM: emulate: enable AVX moves Paolo Bonzini
2025-11-14  0:51 ` [PATCH 00/10] " Keith Busch
2025-11-17 19:57 ` Chang S. Bae
2025-11-21 18:55 ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox