qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: qemu-devel@nongnu.org
Cc: qemu-stable@nongnu.org, Richard Henderson <richard.henderson@linaro.org>
Subject: [PULL 03/27] target/i386: rdpkru/wrpkru are no-prefix instructions
Date: Sun, 12 May 2024 12:49:21 +0200	[thread overview]
Message-ID: <20240512104945.130198-4-pbonzini@redhat.com> (raw)
In-Reply-To: <20240512104945.130198-1-pbonzini@redhat.com>

Reject 0x66/0xf3/0xf2 in front of them.

Cc: qemu-stable@nongnu.org
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/tcg/translate.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 5366dc32dd3..3da4fdf64cc 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -3907,7 +3907,8 @@ static void disas_insn_old(DisasContext *s, CPUState *cpu, int b)
             gen_ldst_modrm(env, s, modrm, ot, OR_TMP0, 1);
             break;
         case 0xee: /* rdpkru */
-            if (prefixes & PREFIX_LOCK) {
+            if (s->prefix & (PREFIX_LOCK | PREFIX_DATA
+                             | PREFIX_REPZ | PREFIX_REPNZ)) {
                 goto illegal_op;
             }
             tcg_gen_trunc_tl_i32(s->tmp2_i32, cpu_regs[R_ECX]);
@@ -3915,7 +3916,8 @@ static void disas_insn_old(DisasContext *s, CPUState *cpu, int b)
             tcg_gen_extr_i64_tl(cpu_regs[R_EAX], cpu_regs[R_EDX], s->tmp1_i64);
             break;
         case 0xef: /* wrpkru */
-            if (prefixes & PREFIX_LOCK) {
+            if (s->prefix & (PREFIX_LOCK | PREFIX_DATA
+                             | PREFIX_REPZ | PREFIX_REPNZ)) {
                 goto illegal_op;
             }
             tcg_gen_concat_tl_i64(s->tmp1_i64, cpu_regs[R_EAX],
-- 
2.45.0



  parent reply	other threads:[~2024-05-12 10:51 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-12 10:49 [PULL 00/27] Build/arch cleanups, target/i386 fixes for 2024-05-10 Paolo Bonzini
2024-05-12 10:49 ` [PULL 01/27] target/i386: remove PCOMMIT from TCG, deprecate property Paolo Bonzini
2024-05-12 10:49 ` [PULL 02/27] target/i386: fix operand size for DATA16 REX.W POPCNT Paolo Bonzini
2024-05-12 10:49 ` Paolo Bonzini [this message]
2024-05-12 10:49 ` [PULL 04/27] target/i386: move prefetch and multi-byte UD/NOP to new decoder Paolo Bonzini
2024-05-12 10:49 ` [PULL 05/27] target/i386: fix feature dependency for WAITPKG Paolo Bonzini
2024-05-12 10:49 ` [PULL 06/27] tests/tcg: cover lzcnt/tzcnt/popcnt Paolo Bonzini
2024-05-12 10:49 ` [PULL 07/27] configure: quote -D options that are passed through to meson Paolo Bonzini
2024-05-12 10:49 ` [PULL 08/27] sh4: select correct components for no-board build Paolo Bonzini
2024-05-12 10:49 ` [PULL 09/27] s390x: move s390_cpu_addr2state to target/s390x/sigp.c Paolo Bonzini
2024-05-12 10:49 ` [PULL 10/27] s390_flic: add migration-enabled property Paolo Bonzini
2024-05-12 10:49 ` [PULL 11/27] s390: move css_migration_enabled from machine to css.c Paolo Bonzini
2024-05-12 10:49 ` [PULL 12/27] s390x: select correct components for no-board build Paolo Bonzini
2024-05-12 10:49 ` [PULL 13/27] tests/qtest: s390x: fix operation in a build without any boards or devices Paolo Bonzini
2024-05-12 10:49 ` [PULL 14/27] xen: initialize legacy backends from xen_bus_init() Paolo Bonzini
2024-05-12 10:49 ` [PULL 15/27] xen: register legacy backends via xen_backend_init Paolo Bonzini
2024-05-12 10:49 ` [PULL 16/27] i386: correctly select code in hw/i386 that depends on other components Paolo Bonzini
2024-05-12 10:49 ` [PULL 17/27] i386: pc: remove unnecessary MachineClass overrides Paolo Bonzini
2024-05-12 10:49 ` [PULL 18/27] hw/i386: split x86.c in multiple parts Paolo Bonzini
2024-05-12 10:49 ` [PULL 19/27] hw/i386: move rtc-reset-reinjection command out of hw/rtc Paolo Bonzini
2024-05-12 10:49 ` [PULL 20/27] i386: select correct components for no-board build Paolo Bonzini
2024-05-12 10:49 ` [PULL 21/27] tests/qtest: arm: fix operation in a build without any boards or devices Paolo Bonzini
2024-05-12 10:49 ` [PULL 22/27] meson: pick libfdt from common_ss when building target-specific files Paolo Bonzini
2024-05-12 10:49 ` [PULL 23/27] meson: move libfdt together with other dependencies Paolo Bonzini
2024-05-12 10:49 ` [PULL 24/27] kconfig: allow compiling out QEMU device tree code per target Paolo Bonzini
2024-05-12 10:49 ` [PULL 25/27] kconfig: express dependency of individual boards on libfdt Paolo Bonzini
2024-05-12 10:49 ` [PULL 26/27] hw/xtensa: require libfdt Paolo Bonzini
2024-05-12 10:49 ` [PULL 27/27] configs: disable emulators that require it if libfdt is not found Paolo Bonzini
2024-05-14  8:51 ` [PULL 00/27] Build/arch cleanups, target/i386 fixes for 2024-05-10 Richard Henderson

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=20240512104945.130198-4-pbonzini@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=richard.henderson@linaro.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 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).