From: Jan Kiszka <[email protected]> Avoid using the cmdline as basis which can move around - as in 91332fa77903. Also makes the thing more readable.
Reported-by: Ralf Ramsauer <[email protected]> Signed-off-by: Jan Kiszka <[email protected]> --- inmates/tests/x86/mmio-access.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/inmates/tests/x86/mmio-access.c b/inmates/tests/x86/mmio-access.c index 7815ded4..1c6a35b3 100644 --- a/inmates/tests/x86/mmio-access.c +++ b/inmates/tests/x86/mmio-access.c @@ -14,6 +14,8 @@ #define EXPECT_EQUAL(a, b) evaluate(a, b, __LINE__) +extern u8 __reset_entry[]; /* assumed to be at 0 */ + static bool all_passed = true; static void evaluate(u64 a, u64 b, int line) @@ -108,7 +110,7 @@ void inmate_main(void) pattern = ~pattern; /* MOV_TO_MEM (89), 64-bit data, mod=0, reg=0, rm=5 (rip+disp32) */ - asm volatile("movq %%rax, cmdline+0x101ef8(%%rip)" + asm volatile("movq %%rax, __reset_entry+0x101ff8(%%rip)" : : "a" (pattern)); EXPECT_EQUAL(*comm_page_reg, pattern); -- 2.16.4 -- 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]. For more options, visit https://groups.google.com/d/optout.
