Coconut SVSM recently gained support for virtio-blk devices using the
virtio-mmio transport [1].  This series adds dedicated virtio-mmio device slots
to the q35 machine type, inteded for use by an SVSM.

The feature is disabled by default and enabled via the new
`-machine q35,x-svsm-virtio-mmio=on` option. The slots are mapped starting at
base address `0xfef00000`, with each slot on a separate page. IRQs are not
wired; the SVSM must use polling mode to drive the devices.

The SVSM discovers the slot base addresses through a
`HARDWARE_INFO_SIMPLE_DEVICE` entry in the `etc/hardware-info` fw_cfg file [2].
This uses a dedicated device ID previously registered in EDK2 [3].

This series depends on the IGVM support series from Roy Hopkins [4]. While
there is no direct code dependency, the IGVM support is required to launch the
SVSM, which is the sole consumer and the only practical means of testing this
feature.

The virtio-mmio transport was chosen for its implementation simplicity. This
approach minimally impacts the guest-visible hardware, reserving only a small
MMIO region.

Any feedback would be greatly appreciated.

- Oliver

[1] https://github.com/coconut-svsm/svsm/pull/635
[2] See commit 8d127aa866
[3] https://github.com/tianocore/edk2/pull/10850
[4] https://lists.gnu.org/archive/html/qemu-devel/2025-06/msg02324.html

Gerd Hoffmann (1):
  q35: add virtio-mmio slots

Oliver Steffen (1):
  hw/uefi: Add hardware-info ID for virtio mmio devices for SVSM

 hw/i386/pc.c                    | 18 +++++++++++++++++-
 hw/i386/pc_q35.c                | 15 +++++++++++++++
 include/hw/i386/pc.h            |  1 +
 include/hw/uefi/hardware-info.h |  1 +
 4 files changed, 34 insertions(+), 1 deletion(-)

-- 
2.50.0


Reply via email to