All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zhao Liu <zhao1.liu@intel.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, chang.seok.bae@intel.com,
	Zhao Liu <zhao1.liu@intel.com>
Subject: Re: [PATCH v2 00/17] target/i386/tcg: implement APX
Date: Mon, 28 Sep 2026 18:57:58 +0800	[thread overview]
Message-ID: <arpINtziWCbjENeo@intel.com> (raw)
In-Reply-To: <20260923173021.317809-1-pbonzini@redhat.com>

On Wed, Sep 23, 2026 at 07:30:04PM +0200, Paolo Bonzini wrote:
> Date: Wed, 23 Sep 2026 19:30:04 +0200
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH v2 00/17] target/i386/tcg: implement APX
> X-Mailer: git-send-email 2.55.0
> 
> This series implements APX support; the main reason to do this is actually
> to have some initial infrastructure for EVEX, without requiring all the
> complexity of AVX512 but introducing the required changes in the
> emulator.  It also forces some changes that (hopefully) make
> QEMU's decoder align a bit more with what Intel processors actually do.
> 
> This series was tested with Zhao Liu's https://github.com/trueptolemy/apx-test.

About the APX testing, I'd also like to acknowledge Chang’s help :-).
He discussed many things of the APX TCG and offered a lot of insightful
advice.

> The failures were analyzed by AI but the fixes had to be redone anyway.
> Other than for a couple typos, the LLM tended to fix the symptom rather
> than be general, which is exactly the opposite of what I wanted.  For
> example, for the MUL/IMUL/DIV/IDIV assertion failure it wanted to modify
> the decoding tables instead of weakening
> 
>   assert(e->s0 == e->s1);
> 
> to this:
> 
>   assert(e->op1 == X86_TYPE_None || e->s0 == e->s1);
> 
> Changing the decoding tables probably is a more common failure mode, indeed,
> but not the right approach in the context of this series.  Other than that,
> the AGENTS.md from the AI policy discussion worked fine and the LLM was very
> keen on helping me not stray from the righteous path.

Maybe off-topic, for AI usage, I have a qemu prompt for AI use of my
own:

https://github.com/trueptolemy/review-prompts/tree/qemu-v0.1-06-08-2026/qemu

(Such prompts and skills also respect the policies in AGENTS.md.)

From my personal experience, at least it is effective to catch annoying
compatibility issues. I'm also considering "upstreaming" it (which I
think would require some refinement) - i.e., contributing it to the
masoncl/review-prompts project, which should be helpful for any future
qemu-sashiko work.

> The issues detected by apx-test and fixed here are as follows:
> 
> - MUL/IMUL/DIV/IDIV caused an assertion failure
> 
> - INC/DEC did not allow 0x66 as a prefix
> 
> - CMOV/CFCMOV's implicit zero-upper behavior was missing
> 
> - IMUL's use of sextT0 conflicted with the zero-upper modifier (see also
>   patches 1-3)
> 
> - MOVBE's register-to-register implementation was missing (see also
>   patch 4)
> 
> - REX2 incorrectly allowed a 0x0F byte following the prefix (patch 8)
> 
> On top of this, the fix between APX and MPX was not correctly resolved,
> which is now fixed, and PUSH2/POP2 use a single MO_128 access.
> 
> I also included a couple recommendations from Chang Seok Bae.  Thanks!

Tested-by: Zhao Liu <zhao1.liu@intel.com>

Thanks,
Zhao



      parent reply	other threads:[~2026-09-28 10:58 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 17:30 [PATCH v2 00/17] target/i386/tcg: implement APX Paolo Bonzini
2026-09-23 17:30 ` [PATCH 01/17] target/i386/tcg: generalize zero- and sign-extension Paolo Bonzini
2026-09-23 19:34   ` Richard Henderson
2026-09-23 17:30 ` [PATCH 02/17] target/i386/tcg: use standard operand order for BSF and BSR Paolo Bonzini
2026-09-23 19:36   ` Richard Henderson
2026-09-23 17:30 ` [PATCH 03/17] target/i386/tcg: use zextT1 for CMPXCHG Paolo Bonzini
2026-09-23 19:36   ` Richard Henderson
2026-09-23 17:30 ` [PATCH 04/17] target/i386/tcg: unify MOVBE and BSWAP generators Paolo Bonzini
2026-09-23 19:39   ` Richard Henderson
2026-09-23 17:30 ` [PATCH 05/17] target/i386/tcg: add APX support to XSAVE/XRSTOR Paolo Bonzini
2026-09-23 17:30 ` [PATCH 06/17] target/i386/tcg: add definition for REX2 prefix Paolo Bonzini
2026-09-23 19:41   ` Richard Henderson
2026-09-23 17:30 ` [PATCH 07/17] target/i386/tcg: mark XSAVE* as not allowing REX2 Paolo Bonzini
2026-09-23 19:42   ` Richard Henderson
2026-09-23 17:30 ` [PATCH 08/17] target/i386/tcg: treat 0x0F as a prefix Paolo Bonzini
2026-09-23 19:51   ` Richard Henderson
2026-09-23 17:30 ` [PATCH 09/17] target/i386/tcg: decode REX2 prefix Paolo Bonzini
2026-09-23 19:57   ` Richard Henderson
2026-09-23 17:30 ` [PATCH 10/17] target/i386/tcg: implement JMPABS instruction Paolo Bonzini
2026-09-23 22:30   ` Richard Henderson
2026-09-23 17:30 ` [PATCH 11/17] target/i386/tcg: extend VEX.vvvv parsing for APX Paolo Bonzini
2026-09-23 22:39   ` Richard Henderson
2026-09-23 17:30 ` [PATCH 12/17] target/i386/tcg: decode EVEX prefix Paolo Bonzini
2026-09-23 23:28   ` Richard Henderson
2026-09-23 17:30 ` [PATCH 13/17] target/i386/tcg: add decode functionality for APX Paolo Bonzini
2026-09-24 15:17   ` Richard Henderson
2026-09-28 10:34     ` Zhao Liu
2026-09-28 12:16     ` Paolo Bonzini
2026-09-29  7:50       ` Richard Henderson
2026-09-29  8:08         ` Paolo Bonzini
2026-09-23 17:30 ` [PATCH 14/17] target/i386/tcg: implement CCMP/CTEST Paolo Bonzini
2026-09-23 17:30 ` [PATCH 15/17] target/i386/tcg: decode APX instructions Paolo Bonzini
2026-09-23 17:30 ` [PATCH 16/17] target/i386: extract computation of no-autoenable features Paolo Bonzini
2026-09-23 17:30 ` [PATCH 17/17] target/i386/tcg: mark APX as supported Paolo Bonzini
2026-09-28 10:57 ` Zhao Liu [this message]

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=arpINtziWCbjENeo@intel.com \
    --to=zhao1.liu@intel.com \
    --cc=chang.seok.bae@intel.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.