aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Imbrenda <imbrenda@linux.ibm.com>2020-06-22 18:21:34 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-06-22 13:45:58 -0400
commitcae10b5b5bdc53480bd2e985f1e43eb8910e40f8 (patch)
tree9a2ee91254e2daebc1e358f7d0011d272ff325ee
parenta434c431d8eb20f9363a8d74e91f21a8faf13e0f (diff)
downloadkvm-unit-tests-cae10b5b5bdc53480bd2e985f1e43eb8910e40f8.tar.gz
x86/cstart.S: initialize stack before using it
It seems the 32-bit initialization code uses the stack before actually initializing it. Probably the boot loader leaves a reasonable value in the stack pointer so this issue has not been noticed before. Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-Id: <20200622162141.279716-2-imbrenda@linux.ibm.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
-rw-r--r--x86/cstart.S2
1 files changed, 1 insertions, 1 deletions
diff --git a/x86/cstart.S b/x86/cstart.S
index 38ac19b..fa62e09 100644
--- a/x86/cstart.S
+++ b/x86/cstart.S
@@ -96,13 +96,13 @@ MSR_GS_BASE = 0xc0000101
.globl start
start:
+ mov $stacktop, %esp
push %ebx
call setup_multiboot
call setup_libcflat
mov mb_cmdline(%ebx), %eax
mov %eax, __args
call __setup_args
- mov $stacktop, %esp
setup_percpu_area
call prepare_32
jmpl $8, $start32