From: Avi Kivity <[email protected]> pusha needs some stack space, or it will fault. The supplied value of 7 is too small.
Provide a real stack for pusha. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]> diff --git a/kvm/test/x86/realmode.c b/kvm/test/x86/realmode.c index c4a2e1e..587f331 100644 --- a/kvm/test/x86/realmode.c +++ b/kvm/test/x86/realmode.c @@ -820,9 +820,14 @@ void test_null(void) print_serial("null test: PASS\n"); } +struct { + char stack[500]; + char top[]; +} tmp_stack; + void test_pusha_popa() { - struct regs inregs = { .eax = 0, .ebx = 1, .ecx = 2, .edx = 3, .esi = 4, .edi = 5, .ebp = 6, .esp = 7}, outregs; + struct regs inregs = { .eax = 0, .ebx = 1, .ecx = 2, .edx = 3, .esi = 4, .edi = 5, .ebp = 6, .esp = (unsigned long)&tmp_stack.top }, outregs; MK_INSN(pusha, "pusha\n\t" "pop %edi\n\t" -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
