diff mbox series

[kvm-unit-tests,1/3] x86: Make per-CPU stacks page-aligned

Message ID 20250215012032.1206409-2-seanjc@google.com (mailing list archive)
State New
Headers show
Series x86: Bump per-CPU stack/data to 12KiB | expand

Commit Message

Sean Christopherson Feb. 15, 2025, 1:20 a.m. UTC
Align the per-CPU stacks, and by extension, the per-CPU data area to page
boundaries so that when things go sideways, it's at least somewhat obvious
that a test overran its stack.  E.g. as is, stacks often start at the
*bottom* of a page, and so it looks like they're always broken because
they immediately split a page.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
 x86/cstart.S   | 3 +--
 x86/cstart64.S | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/x86/cstart.S b/x86/cstart.S
index ceee58f9..df3458fe 100644
--- a/x86/cstart.S
+++ b/x86/cstart.S
@@ -8,9 +8,8 @@  ipi_vector = 0x20
 max_cpus = MAX_TEST_CPUS
 
 .bss
-
+.align 4096
 	. = . + 4096 * max_cpus
-	.align 16
 stacktop:
 
 .data
diff --git a/x86/cstart64.S b/x86/cstart64.S
index 4dff1102..bafb2017 100644
--- a/x86/cstart64.S
+++ b/x86/cstart64.S
@@ -6,9 +6,8 @@  ipi_vector = 0x20
 max_cpus = MAX_TEST_CPUS
 
 .bss
-
+.align 4096
 	. = . + 4096 * max_cpus
-	.align 16
 stacktop:
 
 .data