This series consists of two patches:
The first patch packs the device tree for microvm. This is a soft
prerequisite for the next patch that exposes it via IGVM.
Currently the unpacked microvm device tree buffer occupies 1 MiB
(the default FDT_MAX_SIZE), while the actual content is well below
4096 bytes. Packing removes the unused space.
The second patch exposes the device tree via IGVM.
This will be consumed by Coconut SVSM with the upcoming device tree
support [1]. This will allow SVSM to run on a normal CPU (not AMD SEV-SNP)
and execute all its tests using upstream QEMU.
Eventually edk2 will also be able to consume DT via IGVM, but the work
has not started yet.
[1] https://github.com/coconut-svsm/svsm/pull/1006
To: qemu-devel@nongnu.org
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Stefano Garzarella <sgarzare@redhat.com>
Cc: Ani Sinha <anisinha@redhat.com>
Cc: Zhao Liu <zhao1.liu@intel.com>
Cc: Oliver Steffen <osteffen@redhat.com>
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
---
Changes in v2:
- First patch introduced a shadowed variable, fixed.
- When parameter area is not found return -1.
- Moved `qigvm_directive_device_tree` to backends/igvm.c
- Link to v1: https://lore.kernel.org/qemu-devel/20260608-microvm_device_tree-v1-0-730874ad0008@redhat.com
---
Luigi Leonardi (2):
hw/i386/microvm: pack device tree
igvm: add device tree parameter support
backends/igvm.c | 40 ++++++++++++++++++++++++++++++++++++++++
hw/i386/microvm-dt.c | 11 ++++++++++-
2 files changed, 50 insertions(+), 1 deletion(-)
---
base-commit: cc329c491768b2d91eb0b0984f3baa0bf805776d
change-id: 20260608-microvm_device_tree-0263c3b1be86
Best regards,
--
Luigi Leonardi <leonardi@redhat.com>