From: Zhao Liu <zhao1.liu@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org,
"Chang S . Bae" <chang.seok.bae@intel.com>,
Zide Chen <zide.chen@intel.com>,
Xudong Hao <xudong.hao@intel.com>, Zhao Liu <zhao1.liu@intel.com>
Subject: Re: [PATCH 2/5] i386/cpu: Cache EGPRs in CPUX86State
Date: Wed, 19 Nov 2025 15:47:25 +0800 [thread overview]
Message-ID: <aR12DVNhNuViq7sG@intel.com> (raw)
In-Reply-To: <CABgObfbzzwCafmGehgzCC-pFSnRR1OW_wfQxR4OJDAbv4mCztQ@mail.gmail.com>
On Tue, Nov 18, 2025 at 09:43:26AM +0100, Paolo Bonzini wrote:
> Date: Tue, 18 Nov 2025 09:43:26 +0100
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: Re: [PATCH 2/5] i386/cpu: Cache EGPRs in CPUX86State
>
> On Tue, Nov 18, 2025 at 7:43 AM Zhao Liu <zhao1.liu@intel.com> wrote:
> >
> > From: Zide Chen <zide.chen@intel.com>
> >
> > Cache EGPR[16] in CPUX86State to store APX's EGPR value.
>
> Please change regs[] to have 32 elements instead; see the attached
> patch for a minimal starting point. You can use VMSTATE_SUB_ARRAY to
> split their migration data in two parts. You'll have to create a
> VMSTATE_UINTTL_SUB_ARRAY similar to VMSTATE_UINT64_SUB_ARRAY.
Thanks! VMSTATE_UINTTL_SUB_ARRAY is for target_ulong. I'll move EGPRs
to regs[].
> To support HMP you need to adjust target/i386/monitor.c and
> target/i386/cpu-dump.c. Please make x86_cpu_dump_state print R16...R31
> only if APX is enabled in CPUID.
>
> Also, it would be best for the series to include gdb support. APX is
> supported by gdb as a "coprocessor", the easiest way to do it is to
> copy what riscv_cpu_register_gdb_regs_for_features() does for the FPU,
> and copy https://github.com/intel/gdb/blob/master/gdb/features/i386/64bit-apx.xml
> into QEMU's gdb-xml/ directory.
Good! Thank you for your guidance. I will add GDB support in next
version.
Regards,
Zhao
next prev parent reply other threads:[~2025-11-19 7:26 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 6:58 [PATCH 0/5] i386/cpu: Support APX for KVM Zhao Liu
2025-11-18 6:58 ` [PATCH 1/5] i386/cpu: Add APX EGPRs into xsave area Zhao Liu
2025-11-18 6:58 ` [PATCH 2/5] i386/cpu: Cache EGPRs in CPUX86State Zhao Liu
2025-11-18 8:43 ` Paolo Bonzini
2025-11-19 7:47 ` Zhao Liu [this message]
2025-11-18 6:58 ` [PATCH 3/5] i386/cpu: Add APX migration support Zhao Liu
2025-11-18 6:58 ` [PATCH 4/5] i386/cpu: Support APX CPUIDs Zhao Liu
2025-11-18 8:44 ` Paolo Bonzini
2025-11-19 7:34 ` Zhao Liu
2025-11-19 8:04 ` Paolo Bonzini
2025-11-19 18:04 ` Florian Weimer
2025-11-19 18:08 ` Paolo Bonzini
2025-11-18 6:58 ` [PATCH 5/5] i386/cpu: Mark apx xstate as migratable Zhao Liu
2025-11-18 8:45 ` [PATCH 0/5] i386/cpu: Support APX for KVM Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aR12DVNhNuViq7sG@intel.com \
--to=zhao1.liu@intel.com \
--cc=chang.seok.bae@intel.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=xudong.hao@intel.com \
--cc=zide.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).