target/i386, SCSI changes for 2024-06-11
The following changes since commit 80e8f0602168f451a93e71cbb1d59e93d745e62e:
Merge tag 'bsd-user-misc-2024q2-pull-request' of gitlab.com:bsdimp/qemu into staging (2024-06-09 11:21:55 -0700)
are available in the Git repository at:
https://gitlab.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to 109238a8d97cd8e85ca614109724a0b1222b21f5:
target/i386: SEV: do not assume machine->cgs is SEV (2024-06-17 09:47:39 +0200)
----------------------------------------------------------------
* i386: fix issue with cache topology passthrough
* scsi-disk: migrate emulated requests
* i386/sev: fix Coverity issues
* i386/tcg: more conversions to new decoder
----------------------------------------------------------------
v1->v2: fixed MOV from/to CR and DR in 64-bit modes (does not need REX.W)
Chuang Xu (1):
i386/cpu: fixup number of addressable IDs for processor cores in the physical package
Hyman Huang (1):
scsi-disk: Fix crash for VM configured with USB CDROM after live migration
Pankaj Gupta (3):
i386/sev: fix unreachable code coverity issue i386/sev: Move SEV_COMMON null check before dereferencing i386/sev: Return when sev_common is null
Paolo Bonzini (20):
target/i386: remove CPUX86State argument from generator functions target/i386: rewrite flags writeback for ADCX/ADOX target/i386: put BLS* input in T1, use generic flag writeback target/i386: change X86_ENTRYr to use T0
target/i386: change X86_ENTRYwr to use T0, use it for moves target/i386: replace NoSeg special with NoLoadEA target/i386: fix processing of intercept 0 (read CR0) target/i386: convert MOV from/to CR and DR to new decoder target/i386: replace read_crN helper with read_cr8 target/i386: fix bad sorting of entries in the 0F table target/i386: finish converting 0F AE to the new decoder target/i386: split X86_CHECK_prot into PE and VM86 checks target/i386: convert non-grouped, helper-based 2-byte opcodes target/i386: pull load/writeback out of gen_shiftd_rm_T1 target/i386: adapt gen_shift_count for SHLD/SHRD target/i386: convert SHLD/SHRD to new decoder target/i386: convert LZCNT/TZCNT/BSF/BSR/POPCNT to new decoder target/i386: convert XADD to new decoder
target/i386: convert CMPXCHG to new decoder target/i386: SEV: do not assume machine->cgs is SEV
target/i386/cpu.h | 9 +- target/i386/helper.h | 2 +- target/i386/tcg/decode-new.h | 32 +- hw/core/machine.c | 1 + hw/scsi/scsi-disk.c | 24 +- target/i386/cpu.c | 6 +- target/i386/sev.c | 11 +- target/i386/tcg/seg_helper.c | 16 +- target/i386/tcg/sysemu/misc_helper.c | 20 +- target/i386/tcg/translate.c | 716 +-------------------- target/i386/tcg/decode-new.c.inc | 389 ++++++++---- target/i386/tcg/emit.c.inc | 1166 +++++++++++++++++++++++----------- 12 files changed, 1173 insertions(+), 1219 deletions(-)
Signature · 1 line
2.45.2
[PULL 13/25] target/i386: convert MOV from/to CR and DR to new decoder
Complete implementation of C and D operand types, then the operations are just MOVs.
--- target/i386/tcg/decode-new.h | 1 + target/i386/tcg/translate.c | 79 -------------------------------- target/i386/tcg/decode-new.c.inc | 61 ++++++++++++++++++++++-- target/i386/tcg/emit.c.inc | 24 +++++++++- 4 files changed, 81 insertions(+), 84 deletions(-)
target/i386/tcg/decode-new.h +1 -0
@@ -90,6 +90,7 @@ typedef enum X86OpSize { X86_SIZE_w,/* 16-bit */ X86_SIZE_x,/* 128/256-bit, based on operand size */ X86_SIZE_y,/* 32/64-bit, based on operand size */ + X86_SIZE_y_d64,/* 32/64-bit, based on 64-bit mode */ X86_SIZE_z,/* 16-bit for 16-bit operand size, else 32-bit */ X86_SIZE_z_f64, /* 32-bit for 32-bit operand size or 64-bit mode, else 16-bit */
target/i386/tcg/translate.c +0 -79
91 lines not on this page · raw message
target/i386/tcg/decode-new.c.inc +58 -3
100 lines not on this page · raw message
target/i386/tcg/emit.c.inc +22 -2
@@ -242,12 +242,20 @@ static void gen_load(DisasContext *s, X86DecodedInsn *decode, int opn, TCGv v) tcg_gen_ld32u_tl(v, tcg_env, offsetof(CPUX86State,segs[op->n].selector)); break; +#ifndef CONFIG_USER_ONLY case X86_OP_CR: - tcg_gen_ld_tl(v, tcg_env, offsetof(CPUX86State, cr[op->n])); + if (op->n == 8) { + translator_io_start(&s->base); + gen_helper_read_crN(v, tcg_env, tcg_constant_i32(op->n)); + } else { + tcg_gen_ld_tl(v, tcg_env, offsetof(CPUX86State, cr[op->n])); + } break; case X86_OP_DR: - tcg_gen_ld_tl(v, tcg_env, offsetof(CPUX86State, dr[op->n])); + /* CR4.DE tested in the helper. */ + gen_helper_get_dr(v, tcg_env, tcg_constant_i32(op->n)); break; +#endif case X86_OP_INT: if (op->has_ea) { if (v == s->T0 && decode->e.special == X86_SPECIAL_SExtT0) {
@@ -343,8 +351,20 @@ static void gen_writeback(DisasContext *s, X86DecodedInsn *decode, int opn, TCGv 16, 16, 0); } break; +#ifndef CONFIG_USER_ONLY case X86_OP_CR: + if (op->n == 8) { + translator_io_start(&s->base); + } + gen_helper_write_crN(tcg_env, tcg_constant_i32(op->n), v); + s->base.is_jmp = DISAS_EOB_NEXT; + break; case X86_OP_DR: + /* CR4.DE tested in the helper. */ + gen_helper_set_dr(tcg_env, tcg_constant_i32(op->n), v); + s->base.is_jmp = DISAS_EOB_NEXT; + break; +#endif default: g_assert_not_reached(); }
Signature · 1 line
2.45.2
Richard Henderson
AppliedQuoted 18 lines · Paolo Bonzini
The following changes since commit
80e8f0602168f451a93e71cbb1d59e93d745e62e:Merge tag 'bsd-user-misc-2024q2-pull-request' of gitlab.com:bsdimp/qemu into staging (2024-06-09 11:21:55 -0700)are available in the Git repository at:
https://gitlab.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to
109238a8d97cd8e85ca614109724a0b1222b21f5:target/i386: SEV: do not assume machine->cgs is SEV (2024-06-17 09:47:39 +0200)----------------------------------------------------------------
* i386: fix issue with cache topology passthrough
* scsi-disk: migrate emulated requests
* i386/sev: fix Coverity issues
* i386/tcg: more conversions to new decoder
Quoted 3 lines
----------------------------------------------------------------
v1->v2: fixed MOV from/to CR and DR in 64-bit modes (does not need REX.W)
Applied, thanks. Please update https://wiki.qemu.org/ChangeLog/9.1 as appropriate.
r~