microvm passes no firmware data size to x86_load_linux(), so QEMU
places the initrd at the very top of RAM below 4G, where SeaBIOS also
places the ACPI tables. Usually linuxboot_dma.bin then moves the initrd
below the memory that the BIOS reports via E801. But it keeps the
initrd in place if it ends in the page of the kernel's initrd_addr_max,
0x7fffffff for x86_64 kernels, taking that as a sign that the kernel's
limit and not the end of RAM decided the placement. With exactly 2 GiB
of RAM, both are the same page, so the initrd overwrites the ACPI
tables and other data that SeaBIOS keeps there. Depending on the initrd
size and the configuration, Linux then finds a corrupted DSDT, with
PCIe enabled reports "AE_NO_ACPI_TABLES" and finds no PCI devices, or
hangs while probing EDD, as the SeaBIOS virtio-blk driver then sends
corrupted requests ("virtio-blk missing headers").
To fix thix reserve the same amount of memory as the PC machines do.
This places the initrd below the firmware data in the first place and
lets linuxboot_dma.bin move it below the BIOS data for 2 GiB of RAM,
too.
Fixes: 8045df14bcca ("microvm/acpi: add minimal acpi support")
Cc: [email protected]
Signed-off-by: Thomas Lamprecht <[email protected]>
---
hw/i386/microvm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index 18983a363b..b35facce08 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -330,7 +330,7 @@ static void microvm_memory_init(MicrovmMachineState *mms)
rom_set_fw(fw_cfg);
if (machine->kernel_filename != NULL) {
- mmc->x86_load_linux(x86ms, fw_cfg, 0);
+ mmc->x86_load_linux(x86ms, fw_cfg, X86_FW_DATA);
}
if (mms->option_roms) {
--
2.47.3