All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] target/i386/tcg: fix REPScalar with memory operand
@ 2026-09-23 12:47 Paolo Bonzini
  2026-09-23 16:41 ` Richard Henderson
  2026-09-28  7:53 ` Zhao Liu
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2026-09-23 12:47 UTC (permalink / raw)
  To: qemu-devel; +Cc: Zhao Liu

By the time validate_vex() runs, e->s2 is not used anymore and
decode->op[2].ot has already been filled in by decode_size().
So it's the latter that has to be adjusted, just like before
commit b7d4ec4832d ("target/i386/tcg: move VEX validation early",
2026-08-26).

Fixes: b7d4ec4832d ("target/i386/tcg: move VEX validation early", 2026-08-26)
Reported-by: Zhao Liu <zhao1.liu@intel.com>
---
 target/i386/tcg/decode-new.c.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc
index 8d1e581cfde..26f6d6277be 100644
--- a/target/i386/tcg/decode-new.c.inc
+++ b/target/i386/tcg/decode-new.c.inc
@@ -2671,7 +2671,7 @@ static bool validate_vex(DisasContext *s, X86DecodedInsn *decode)
             }
             assert(e->op2 == X86_TYPE_W && e->s2 == X86_SIZE_x);
             if ((s->modrm >> 6) != 3) {
-                e->s2 = s->prefix & PREFIX_REPNZ ? X86_SIZE_sd : X86_SIZE_ss;
+                decode->op[2].ot = s->prefix & PREFIX_REPNZ ? MO_64 : MO_32;
             }
         }
         break;
-- 
2.55.0



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

* Re: [PATCH] target/i386/tcg: fix REPScalar with memory operand
  2026-09-23 12:47 [PATCH] target/i386/tcg: fix REPScalar with memory operand Paolo Bonzini
@ 2026-09-23 16:41 ` Richard Henderson
  2026-09-28  7:53 ` Zhao Liu
  1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2026-09-23 16:41 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: Zhao Liu

On 9/23/26 05:47, Paolo Bonzini wrote:
> By the time validate_vex() runs, e->s2 is not used anymore and
> decode->op[2].ot has already been filled in by decode_size().
> So it's the latter that has to be adjusted, just like before
> commit b7d4ec4832d ("target/i386/tcg: move VEX validation early",
> 2026-08-26).
> 
> Fixes: b7d4ec4832d ("target/i386/tcg: move VEX validation early", 2026-08-26)
> Reported-by: Zhao Liu <zhao1.liu@intel.com>
> ---
>   target/i386/tcg/decode-new.c.inc | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc
> index 8d1e581cfde..26f6d6277be 100644
> --- a/target/i386/tcg/decode-new.c.inc
> +++ b/target/i386/tcg/decode-new.c.inc
> @@ -2671,7 +2671,7 @@ static bool validate_vex(DisasContext *s, X86DecodedInsn *decode)
>               }
>               assert(e->op2 == X86_TYPE_W && e->s2 == X86_SIZE_x);
>               if ((s->modrm >> 6) != 3) {
> -                e->s2 = s->prefix & PREFIX_REPNZ ? X86_SIZE_sd : X86_SIZE_ss;
> +                decode->op[2].ot = s->prefix & PREFIX_REPNZ ? MO_64 : MO_32;
>               }
>           }
>           break;

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


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

* Re: [PATCH] target/i386/tcg: fix REPScalar with memory operand
  2026-09-23 12:47 [PATCH] target/i386/tcg: fix REPScalar with memory operand Paolo Bonzini
  2026-09-23 16:41 ` Richard Henderson
@ 2026-09-28  7:53 ` Zhao Liu
  1 sibling, 0 replies; 3+ messages in thread
From: Zhao Liu @ 2026-09-28  7:53 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel

On Wed, Sep 23, 2026 at 02:47:49PM +0200, Paolo Bonzini wrote:
> Date: Wed, 23 Sep 2026 14:47:49 +0200
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH] target/i386/tcg: fix REPScalar with memory operand
> X-Mailer: git-send-email 2.55.0
> 
> By the time validate_vex() runs, e->s2 is not used anymore and
> decode->op[2].ot has already been filled in by decode_size().
> So it's the latter that has to be adjusted, just like before
> commit b7d4ec4832d ("target/i386/tcg: move VEX validation early",
> 2026-08-26).
> 
> Fixes: b7d4ec4832d ("target/i386/tcg: move VEX validation early", 2026-08-26)
> Reported-by: Zhao Liu <zhao1.liu@intel.com>
> ---
>  target/i386/tcg/decode-new.c.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

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



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

end of thread, other threads:[~2026-09-28  7:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-23 12:47 [PATCH] target/i386/tcg: fix REPScalar with memory operand Paolo Bonzini
2026-09-23 16:41 ` Richard Henderson
2026-09-28  7:53 ` Zhao Liu

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.