All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH kvm-unit-tests] realmode: load above stack
@ 2024-06-04 14:35 Paolo Bonzini
  2024-06-04 14:40 ` Thomas Huth
  2026-05-04  7:58 ` Thomas Huth
  0 siblings, 2 replies; 20+ messages in thread
From: Paolo Bonzini @ 2024-06-04 14:35 UTC (permalink / raw)
  To: kvm; +Cc: thuth

The bottom 32K of memory are generally reserved for use by the BIOS;
for example, traditionally the boot loader is placed at 0x7C00 and
the stack grows below that address.

It turns out that with some versions of clang, realmode.flat has
become big enough that it overlaps the stack used by the multiboot
option ROM loader.  The result is that a couple instructions are
overwritten.  Typically one or two tests fail and that's it...

Move the code above the forbidden region, in real 90s style.

Reported-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 x86/realmode.lds | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86/realmode.lds b/x86/realmode.lds
index 0ed3063b..e4782a98 100644
--- a/x86/realmode.lds
+++ b/x86/realmode.lds
@@ -1,6 +1,6 @@
 SECTIONS
 {
-    . = 16K;
+    . = 32K;
     stext = .;
     .text : { *(.init) *(.text) }
     . = ALIGN(4K);
-- 
2.45.1


^ permalink raw reply related	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2026-05-05 17:08 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-04 14:35 [PATCH kvm-unit-tests] realmode: load above stack Paolo Bonzini
2024-06-04 14:40 ` Thomas Huth
2024-06-04 14:50   ` Paolo Bonzini
2026-05-04  7:58 ` Thomas Huth
2026-05-04  8:07   ` intel_iommu unit test is also failing (was: Re: [PATCH kvm-unit-tests] realmode: load above stack) Thomas Huth
2026-05-04 15:45     ` Peter Xu
2026-05-05  5:49       ` Clément MATHIEU--DRIF
2026-05-05  6:37         ` Clément MATHIEU--DRIF
2026-05-05  7:36           ` Clément MATHIEU--DRIF
2026-05-05  9:27             ` Clément MATHIEU--DRIF
2026-05-05  9:45               ` intel_iommu unit test is also failing Thomas Huth
2026-05-05  9:53                 ` Clément MATHIEU--DRIF
2026-05-05 10:15                   ` Thomas Huth
2026-05-05 10:23                 ` Michael S. Tsirkin
2026-05-05 10:34                   ` Thomas Huth
2026-05-05 10:53                     ` Michael S. Tsirkin
2026-05-05 11:38                       ` Thomas Huth
2026-05-05 12:33                         ` Michael S. Tsirkin
2026-05-05 17:08                           ` Thomas Huth
2026-05-05 11:39                       ` Clément MATHIEU--DRIF

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.