esp needs to point at the end of the stack, or it will corrupt memory. Signed-off-by: Avi Kivity <avi@xxxxxxxxxx> --- x86/realmode.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/x86/realmode.c b/x86/realmode.c index 5c62ec4..50eaa5e 100644 --- a/x86/realmode.c +++ b/x86/realmode.c @@ -541,7 +541,7 @@ void test_long_jmp() u32 esp[16]; inregs = (struct regs){ 0 }; - inregs.esp = (u32)esp; + inregs.esp = (u32)(esp+16); MK_INSN(long_jmp, "call 1f\n\t" "jmp 2f\n\t" "1: jmp $0, $test_function\n\t" -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html