The sequence 67 48 a1 f8 1f 10 00 is "addr32 mov 0x101ff8, %rax".
In fact, data is accessed 64-bit wide, and not 32-bit wide as the comment stated, and as the comparison expected. 0x67 only restricts the absolute address operand, and not the data width. Let's also use the mnemonic instead of the binary representation. Cc: Henning Schild <[email protected]> Fixes: 23f745cbe19089d ("x86: mmio: Skip over address size prefix found in x32 code") Signed-off-by: Ralf Ramsauer <[email protected]> --- Puh, I hope that this is it with the MMIO stuff... inmates/tests/x86/mmio-access.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inmates/tests/x86/mmio-access.c b/inmates/tests/x86/mmio-access.c index 3af0db9b..a17455b0 100644 --- a/inmates/tests/x86/mmio-access.c +++ b/inmates/tests/x86/mmio-access.c @@ -110,10 +110,10 @@ void inmate_main(void) EXPECT_EQUAL(reg64, (u32)pattern); reg64 = 0ULL; - /* MEM_TO_AX (a1), 32-bit data, 32-bit address */ - asm volatile(".byte 0x67, 0x48, 0xa1, 0xf8, 0x1f, 0x10, 0x00" + /* MEM_TO_AX (a1), 64-bit data, 32-bit address, AD SZ override prefix */ + asm volatile("addr32 mov 0x101ff8, %%rax" : "=a" (reg64) : "a" (0)); - EXPECT_EQUAL((u32)reg64, (u32)pattern); + EXPECT_EQUAL(reg64, pattern); printk("MMIO read test %s\n\n", all_passed ? "passed" : "FAILED"); -- 2.21.0 -- You received this message because you are subscribed to the Google Groups "Jailhouse" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jailhouse-dev/20190607143825.26120-1-ralf.ramsauer%40oth-regensburg.de. For more options, visit https://groups.google.com/d/optout.
