Skip to contentSkip to conversation

x86: Fix SMP stacks

PATCH Applied Nadav Amit 2 participants 2 messages May 20, 2019 – Jun 6, 2019 KVM

lore
Share & tools
lore

Nadav Amit

author
#0 lore raw

PATCH 1/1 x86: Fix SMP stacks

Avoid smashing the SMP stacks during boot as currently happens by allocating sufficient space for them.

---
 x86/cstart64.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
x86/cstart64.S +2 -2
index a4b55c5..71c3153 100644
@@ -19,7 +19,7 @@ max_cpus = MAX_TEST_CPUS
 	.align 16
 stacktop:
 
-	. = . + 4096
+	. = . + 4096 * max_cpus
 	.align 16
 ring0stacktop:
 
@@ -170,7 +170,7 @@ efer = 0xc0000080
 	mov %eax, %cr0
 	ret
 
-smp_stacktop:	.long 0xa0000
+smp_stacktop:	.long stacktop - 4096
 
 .align 16
 
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw
Quoted 23 lines · Nadav Amit

Avoid smashing the SMP stacks during boot as currently happens by allocating sufficient space for them.

---
 x86/cstart64.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
x86/cstart64.S +1 -1
index a4b55c5..71c3153 100644
@@ -19,7 +19,7 @@ max_cpus = MAX_TEST_CPUS
 	.align 16
 stacktop:
 
-	. = . + 4096
+	. = . + 4096 * max_cpus
 	.align 16
 ring0stacktop:
 

x86/cstart64.S efer = 0xc0000080 · line 176

Quoted 8 lines
x86/cstart64.S +1 -1
@@ -170,7 +170,7 @@ efer = 0xc0000080
 	mov %eax, %cr0
 	ret
 
-smp_stacktop:	.long 0xa0000
+smp_stacktop:	.long stacktop - 4096
 
 .align 16
 

Queued, thanks.

Paolo