All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH kvm-unit-tests] x86: fix stack pointer after call
@ 2020-06-25 11:15 Paolo Bonzini
  2020-06-25 13:01 ` Thomas Huth
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Bonzini @ 2020-06-25 11:15 UTC (permalink / raw)
  To: kvm; +Cc: namit

Since setup_multiboot has a C calling convention, the stack pointer must
be adjusted after the call.  Without this change, the bottom of the
percpu area would be 4 bytes below the bottom of the stack.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 x86/cstart.S | 1 +
 1 file changed, 1 insertion(+)

diff --git a/x86/cstart.S b/x86/cstart.S
index deb08b7..409cb00 100644
--- a/x86/cstart.S
+++ b/x86/cstart.S
@@ -116,6 +116,7 @@ start:
 
         push %ebx
         call setup_multiboot
+        addl $4, %esp
         call setup_libcflat
         mov mb_cmdline(%ebx), %eax
         mov %eax, __args
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-25 13:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-25 11:15 [PATCH kvm-unit-tests] x86: fix stack pointer after call Paolo Bonzini
2020-06-25 13:01 ` Thomas Huth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.