Re: [PATCH kvm-unit-tests] x86: fix stack pointer after call

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/06/2020 13.15, Paolo Bonzini wrote:
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@xxxxxxxxxx>
---
  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

Looks right.

Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux