[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 68/79] target/i386: fix translation for icount mode
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 68/79] target/i386: fix translation for icount mode |
Date: |
Sun, 30 Sep 2018 10:13:06 +0200 |
From: Pavel Dovgalyuk <address@hidden>
This patch fixes the checking of boundary crossing instructions.
In icount mode only first instruction of the block may cross
the page boundary to keep the translation deterministic.
These conditions already existed, but compared the wrong variable.
Signed-off-by: Pavel Dovgalyuk <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
target/i386/translate.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/target/i386/translate.c b/target/i386/translate.c
index 8fcd88e..83c1ebe 100644
--- a/target/i386/translate.c
+++ b/target/i386/translate.c
@@ -8538,10 +8538,10 @@ static void i386_tr_translate_insn(DisasContextBase
*dcbase, CPUState *cpu)
chance to happen */
dc->base.is_jmp = DISAS_TOO_MANY;
} else if ((tb_cflags(dc->base.tb) & CF_USE_ICOUNT)
- && ((dc->base.pc_next & TARGET_PAGE_MASK)
- != ((dc->base.pc_next + TARGET_MAX_INSN_SIZE - 1)
+ && ((pc_next & TARGET_PAGE_MASK)
+ != ((pc_next + TARGET_MAX_INSN_SIZE - 1)
& TARGET_PAGE_MASK)
- || (dc->base.pc_next & ~TARGET_PAGE_MASK) == 0)) {
+ || (pc_next & ~TARGET_PAGE_MASK) == 0)) {
/* Do not cross the boundary of the pages in icount mode,
it can cause an exception. Do it only when boundary is
crossed by the first instruction in the block.
--
1.8.3.1
- [Qemu-devel] [PULL 63/79] scsi-block: Deprecate rotation_rate, (continued)
- [Qemu-devel] [PULL 63/79] scsi-block: Deprecate rotation_rate, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 72/79] memory: Use MAKE_64BIT_MASK(), Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 50/79] Revert "chardev: tcp: postpone TLS work until machine done", Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 74/79] memory: Fix access_with_adjusted_size(small size) on big-endian memory regions, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 76/79] hw/nvram/fw_cfg: Use memberwise copy of MemoryRegionOps struct, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 78/79] cpus: fix TCG kick timer leak, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 71/79] virtio: do not take address of packed members, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 66/79] qom/object: add some interface asserts, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 73/79] memory: Refactor common shifting code from accessors, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 77/79] docs/devel/memory.txt: Document _with_attrs accessors, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 68/79] target/i386: fix translation for icount mode,
Paolo Bonzini <=
- [Qemu-devel] [PULL 56/79] target/i386: rename HF_SVMI_MASK to HF_GUEST_MASK, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 64/79] lsi53c895a: convert to trace-events, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 79/79] hw/scsi/mptendian: Avoid taking address of fields in packed structs, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 55/79] target/i386: unify masking of interrupts, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 65/79] accel/tcg: Remove dead code, Paolo Bonzini, 2018/09/30
- [Qemu-devel] [PULL 75/79] memory: Remove old_mmio accessors, Paolo Bonzini, 2018/09/30
- Re: [Qemu-devel] [PULL 00/79] Misc QEMU patches for 2018-09-30, Philippe Mathieu-Daudé, 2018/09/30