qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] igvm: Supply MADT via IGVM parameter
@ 2025-12-11  8:15 Oliver Steffen
  2025-12-11  8:15 ` [PATCH 1/3] hw/acpi: Make BIOS linker optional Oliver Steffen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Oliver Steffen @ 2025-12-11  8:15 UTC (permalink / raw)
  To: qemu-devel
  Cc: Joerg Roedel, Marcel Apfelbaum, Gerd Hoffmann, Paolo Bonzini,
	Stefano Garzarella, Marcelo Tosatti, kvm, Richard Henderson,
	Zhao Liu, Eduardo Habkost, Ani Sinha, Michael S. Tsirkin,
	Luigi Leonardi, Igor Mammedov, Oliver Steffen

When launching using an IGVM file, supply a copy of the MADT (part of the ACPI
tables) via an IGVM parameter (IGVM_VHY_MADT) to the guest, in addition to the
regular fw_cfg mechanism.

The IGVM parameter can be consumed by Coconut SVSM [1], instead of relying on
the fw_cfg interface, which has caused problems before due to unexpected access
[2,3]. Using IGVM parameters is the default way for Coconut SVSM; switching
over would allow removing specialized code paths for QEMU in Coconut.

In any case OVMF, which runs after SVSM has already been initialized, will
continue reading all ACPI tables via fw_cfg and provide fixed up ACPI data to
the OS as before.

This series makes ACPI table building more generic by making the BIOS linker
optional. This allows the MADT to be generated outside of the ACPI build
context. A new function (acpi_build_madt_standalone()) is added for that. With
that, the IGVM MADT parameter field can be filled with the MADT data during
processing of the IGVM file.

Generating the MADT twice (IGVM processing and ACPI table building) seems
acceptable, since there is no infrastructure to obtain the MADT out of the ACPI
table memory area during IGVM processing.

[1] https://github.com/coconut-svsm/svsm/pull/858
[2] https://gitlab.com/qemu-project/qemu/-/issues/2882
[3] https://github.com/coconut-svsm/svsm/issues/646

Based-On: 20251118122133.1695767-1-kraxel@redhat.com
Signed-off-by: Oliver Steffen <osteffen@redhat.com>

Oliver Steffen (3):
  hw/acpi: Make BIOS linker optional
  hw/acpi: Add standalone function to build MADT
  igvm: Fill MADT IGVM parameter field

 backends/igvm-cfg.c       |  8 +++++++-
 backends/igvm.c           | 37 ++++++++++++++++++++++++++++++++++++-
 hw/acpi/aml-build.c       |  7 +++++--
 hw/i386/acpi-build.c      |  8 ++++++++
 hw/i386/acpi-build.h      |  2 ++
 include/system/igvm-cfg.h |  4 ++--
 include/system/igvm.h     |  2 +-
 target/i386/sev.c         |  2 +-
 8 files changed, 62 insertions(+), 8 deletions(-)

-- 
2.52.0



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

end of thread, other threads:[~2025-12-11 10:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-11  8:15 [PATCH 0/3] igvm: Supply MADT via IGVM parameter Oliver Steffen
2025-12-11  8:15 ` [PATCH 1/3] hw/acpi: Make BIOS linker optional Oliver Steffen
2025-12-11  8:15 ` [PATCH 2/3] hw/acpi: Add standalone function to build MADT Oliver Steffen
2025-12-11  8:15 ` [PATCH 3/3] igvm: Fill MADT IGVM parameter field Oliver Steffen
2025-12-11  8:46   ` Stefano Garzarella
2025-12-11  9:24     ` Oliver Steffen
2025-12-11 10:11       ` Stefano Garzarella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).