Message ID | 20200625111526.1620-1-pbonzini@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [kvm-unit-tests] x86: fix stack pointer after call | expand |
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@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 Looks right. Reviewed-by: Thomas Huth <thuth@redhat.com>
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
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(+)