qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/9] i386/cpu: Support APX for KVM
@ 2025-12-11  7:09 Zhao Liu
  2025-12-11  7:09 ` [PATCH v2 1/9] i386/cpu: Add APX EGPRs into xsave area Zhao Liu
                   ` (9 more replies)
  0 siblings, 10 replies; 14+ messages in thread
From: Zhao Liu @ 2025-12-11  7:09 UTC (permalink / raw)
  To: Paolo Bonzini, Alex Bennée, Philippe Mathieu-Daudé,
	Peter Xu, Fabiano Rosas
  Cc: qemu-devel, kvm, Chang S . Bae, Zide Chen, Xudong Hao, Zhao Liu

Hi,

This series adds APX (Advanced Performance Extensions) support in QEMU
to enable APX in Guest based on KVM (RFC v1 [1]).

This series is based on CET v5:

https://lore.kernel.org/qemu-devel/20251211060801.3600039-1-zhao1.liu@intel.com/

And you can also find the code here:

https://gitlab.com/zhao.liu/qemu/-/commits/i386-all-for-dmr-v2.1-12-10-2025

Compared with v1 [2], v2 adds:
 * HMP support ("print" & "info registers").
 * gdbstub support.

Thanks for your review!


Overview
========

Intel Advanced Performance Extensions (Intel APX) expands the Intel 64
instruction set architecture with access to more registers (16
additional general-purpose registers (GPRs) R16–R31) and adds various
new features that improve general-purpose performance. The extensions
are designed to provide efficient performance gains across a variety of
workloads without significantly increasing silicon area or power
consumption of the core.

APX spec link (rev.07) is:
https://cdrdv2.intel.com/v1/dl/getContent/861610

At QEMU side, the enabling work mainly includes three parts:

1. save/restore/migrate the xstate of APX.
   * APX xstate is a user xstate, but it reuses MPX xstate area in
     un-compacted XSAVE buffer.
   * To address this, QEMU will reject both APX and MPX if their CPUID
     feature bits are set at the same (in Patch 1).

2. add related CPUIDs support in feature words.

3. debug support, including HMP & gdbstub.


Change Log
==========

Changes sicne v1:
 * Expend current GPR array (CPUX86State.regs) to 32 elements instead of
   a new array.
 * HMP support ("print" & "info registers").
 * gdbstub support.

[1]: KVM RFC: https://lore.kernel.org/kvm/20251110180131.28264-1-chang.seok.bae@intel.com/
[2]: QEMU APX v1: https://lore.kernel.org/qemu-devel/20251118065817.835017-1-zhao1.liu@intel.com/

Thanks and Best Regards,
Zhao
---
Zhao Liu (6):
  i386/machine: Use VMSTATE_UINTTL_SUB_ARRAY for vmstate of
    CPUX86State.regs
  i386/gdbstub: Add APX support for gdbstub
  i386/cpu-dump: Dump entended GPRs for APX supported guest
  i386/monitor: Support EGPRs in hmp_print
  i386/cpu: Support APX CPUIDs
  i386/cpu: Mark APX xstate as migratable

Zide Chen (3):
  i386/cpu: Add APX EGPRs into xsave area
  i386/cpu: Cache EGPRs in CPUX86State
  i386/cpu: Add APX migration support

 configs/targets/x86_64-softmmu.mak |  2 +-
 gdb-xml/i386-64bit-apx.xml         | 26 +++++++++++
 include/migration/cpu.h            |  4 ++
 target/i386/cpu-dump.c             | 30 +++++++++++--
 target/i386/cpu.c                  | 68 ++++++++++++++++++++++++++++-
 target/i386/cpu.h                  | 48 +++++++++++++++++++--
 target/i386/gdbstub.c              | 69 +++++++++++++++++++++++++++++-
 target/i386/machine.c              | 27 +++++++++++-
 target/i386/monitor.c              | 16 +++++++
 target/i386/xsave_helper.c         | 16 +++++++
 10 files changed, 293 insertions(+), 13 deletions(-)
 create mode 100644 gdb-xml/i386-64bit-apx.xml

-- 
2.34.1



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

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

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-11  7:09 [PATCH v2 0/9] i386/cpu: Support APX for KVM Zhao Liu
2025-12-11  7:09 ` [PATCH v2 1/9] i386/cpu: Add APX EGPRs into xsave area Zhao Liu
2025-12-11  7:09 ` [PATCH v2 2/9] i386/machine: Use VMSTATE_UINTTL_SUB_ARRAY for vmstate of CPUX86State.regs Zhao Liu
2025-12-11  7:09 ` [PATCH v2 3/9] i386/cpu: Cache EGPRs in CPUX86State Zhao Liu
2025-12-11  7:09 ` [PATCH v2 4/9] i386/gdbstub: Add APX support for gdbstub Zhao Liu
2025-12-11  7:09 ` [PATCH v2 5/9] i386/cpu-dump: Dump entended GPRs for APX supported guest Zhao Liu
2025-12-11  7:09 ` [PATCH v2 6/9] i386/monitor: Support EGPRs in hmp_print Zhao Liu
2025-12-11  7:09 ` [PATCH v2 7/9] i386/cpu: Add APX migration support Zhao Liu
2025-12-11  7:09 ` [PATCH v2 8/9] i386/cpu: Support APX CPUIDs Zhao Liu
2025-12-11  7:09 ` [PATCH v2 9/9] i386/cpu: Mark APX xstate as migratable Zhao Liu
2025-12-11  8:08 ` [PATCH v2 0/9] i386/cpu: Support APX for KVM Paolo Bonzini
2025-12-11  9:16   ` Zhao Liu
2025-12-11  9:42     ` Paolo Bonzini
2025-12-11 11:42       ` Zhao Liu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).