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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 x86/cstart.S   | 3 +--
 x86/cstart64.S | 3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

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
-- 
2.48.1.601.g30ceb7b040-goog





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux