diff mbox series

[kvm-unit-tests] x86: Fix SMP stacks

Message ID 20190520091730.15536-1-nadav.amit@gmail.com (mailing list archive)
State New, archived
Headers show
Series [kvm-unit-tests] x86: Fix SMP stacks | expand

Commit Message

Nadav Amit May 20, 2019, 9:17 a.m. UTC
Avoid smashing the SMP stacks during boot as currently happens by
allocating sufficient space for them.

Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
---
 x86/cstart64.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Paolo Bonzini June 6, 2019, 12:25 p.m. UTC | #1
On 20/05/19 11:17, Nadav Amit wrote:
> Avoid smashing the SMP stacks during boot as currently happens by
> allocating sufficient space for them.
> 
> Signed-off-by: Nadav Amit <nadav.amit@gmail.com>
> ---
>  x86/cstart64.S | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/x86/cstart64.S b/x86/cstart64.S
> index a4b55c5..71c3153 100644
> --- a/x86/cstart64.S
> +++ b/x86/cstart64.S
> @@ -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
>  
> 

Queued, thanks.

Paolo
diff mbox series

Patch

diff --git a/x86/cstart64.S b/x86/cstart64.S
index a4b55c5..71c3153 100644
--- a/x86/cstart64.S
+++ b/x86/cstart64.S
@@ -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