[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 064/113] tcg/arm: Fix memory barrier encoding
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 064/113] tcg/arm: Fix memory barrier encoding |
Date: |
Mon, 18 Jun 2018 20:42:30 -0500 |
From: Henry Wertz <address@hidden>
I found with qemu 2.11.x or newer that I would get an illegal instruction
error running some Intel binaries on my ARM chromebook. On investigation,
I found it was quitting on memory barriers.
qemu instruction:
mb $0x31
was translating as:
0x604050cc: 5bf07ff5 blpl #0x600250a8
After patch it gives:
0x604050cc: f57ff05b dmb ish
In short, I found INSN_DMB_ISH (memory barrier for ARMv7) appeared to be
correct based on online docs, but due to some endian-related shenanigans it
had to be byte-swapped to suit qemu; it appears INSN_DMB_MCR (memory
barrier for ARMv6) also should be byte swapped (and this patch does so).
I have not checked for correctness of aarch64's barrier instruction.
Cc: address@hidden
Reviewed-by: Peter Maydell <address@hidden>
Signed-off-by: Henry Wertz <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
(cherry picked from commit 3f814b803797c007abfe5c4041de754e01723031)
Signed-off-by: Michael Roth <address@hidden>
---
tcg/arm/tcg-target.inc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tcg/arm/tcg-target.inc.c b/tcg/arm/tcg-target.inc.c
index 98a12535a5..ccbd324262 100644
--- a/tcg/arm/tcg-target.inc.c
+++ b/tcg/arm/tcg-target.inc.c
@@ -159,8 +159,8 @@ typedef enum {
INSN_STRD_IMM = 0x004000f0,
INSN_STRD_REG = 0x000000f0,
- INSN_DMB_ISH = 0x5bf07ff5,
- INSN_DMB_MCR = 0xba0f07ee,
+ INSN_DMB_ISH = 0xf57ff05b,
+ INSN_DMB_MCR = 0xee070fba,
/* Architected nop introduced in v6k. */
/* ??? This is an MSR (imm) 0,0,0 insn. Anyone know if this
--
2.11.0
- [Qemu-devel] [PATCH 056/113] hw/block/pflash_cfi: fix off-by-one error, (continued)
- [Qemu-devel] [PATCH 056/113] hw/block/pflash_cfi: fix off-by-one error, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 057/113] tcg: Introduce tcg_set_insn_start_param, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 059/113] device_tree: Increase FDT_MAX_SIZE to 1 MiB, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 058/113] hw/char/cmsdk-apb-uart.c: Correctly clear INTSTATUS bits on writes, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 055/113] vfio-ccw: fix memory leaks in vfio_ccw_realize(), Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 060/113] ccid: Fix dwProtocols advertisement of T=0, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 005/113] sdl: workaround bug in sdl 2.0.8 headers, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 061/113] nbd/client: Fix error messages during NBD_INFO_BLOCK_SIZE, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 063/113] s390-ccw: force diag 308 subcode to unsigned long, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 062/113] s390: Do not pass inofficial IPL type to the guest, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 064/113] tcg/arm: Fix memory barrier encoding,
Michael Roth <=
- [Qemu-devel] [PATCH 065/113] target/arm: Implement v8M VLLDM and VLSTM, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 066/113] target/ppc: always set PPC_MEM_TLBIE in pre 2.8 migration hack, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 068/113] qxl: fix local renderer crash, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 067/113] spapr: don't advertise radix GTSE if max-compat-cpu < power9, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 069/113] configure: recognize more rpmbuild macros, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 070/113] qemu-img: Resolve relative backing paths in rebase, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 073/113] qemu-img: Use only string options in img_open_opts, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 074/113] iotests: Add test for -U/force-share conflicts, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 071/113] iotests: Add test for rebasing with relative paths, Michael Roth, 2018/06/18
- [Qemu-devel] [PATCH 006/113] spapr: Allow some cases where we can't set VSMT mode in the kernel, Michael Roth, 2018/06/18