[svsm-devel] [EXTERNAL] virtio-mmio base address: fw_cfg vs IGVM

Jon Lange jlange at microsoft.com
Tue Feb 18 22:01:48 CET 2025


The fixed parameters in the IGVM file are intended to communicate information that is generally hypervisor-specific, not information that might vary from one configuration to the next on the same architecture.  For example, Hyper-V always wants diagnostic information from the paravisor to come over COM3, so we select port 3 for the serial console.  The same is true for memory layout, use of vTOM, and other information that is specifically encoded in the IGVM parameter block because Hyper-V wants the same configuration every time.  This makes those parameters somewhat different from virtio configuration.

There is a set of unmeasured parameters that can be passed by an IGVM loader.  The only example today of such a parameter that is used by COCONUT-SVSM is the vCPU count.  The philosophy behind unmeasured IGVM parameters was to allow the loader to pass some set of information that is needed to get the guest far enough through the boot process that it can use a more common interface to query the rest of the hardware state.  In the case of running on QEMU, I would assert that fw_cfg is the primitive interface on top of which everything else is built, so exposing the virtio configuration via fw_cfg is very reasonable.

Note that the Hyper-V hypervisor doesn't use fw_cfg, but it's also unlikely to use virtio for many of its virtual devices (those would be enumerated over vmbus), so I don't foresee a compatibility problem exposing virtio via fw_cfg.  Until we can identify a hardware resource that we believe must be common across hypervisors that do and do not use fw_cfg, I don't think we need to define something else.  Let's wait until we have a concrete use case before we deviate from the interfaces that are already supported in the code.

-Jon

-----Original Message-----
From: Svsm-devel <svsm-devel-bounces at coconut-svsm.dev> On Behalf Of Oliver Steffen
Sent: Tuesday, February 18, 2025 11:05 AM
To: svsm-devel at coconut-svsm.dev
Subject: [EXTERNAL] [svsm-devel] virtio-mmio base address: fw_cfg vs IGVM

[Some people who received this message don't often get email from osteffen at redhat.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]

Hi all,

In last week's meeting we talked about communicating the mmio base address for the virtio driver to the SVSM via Qemu's fw_cfg interface.

This is easy to do, but now I am unsure how we want to handle hardware information in general.

Currently, the serial ports for logging, gdb, etc. are configured via the IGVM file.
The address for virtio-mmio is not really a different thing. Shouldn't we use a common approach?

Using the IGVM file makes these things part of the launch measurement and requires rebuilding the file if anything needs to change.
Do we want that? Or should it rather be a run-time configuration?

Thanks.

- Oliver

--
Svsm-devel mailing list
Svsm-devel at coconut-svsm.dev
https://mail.8bytes.org/cgi-bin/mailman/listinfo/svsm-devel


More information about the Svsm-devel mailing list