[PATCH v2 0/9] Introducing guest driven VM launch update mechanism (BYOF interface)

Ani Sinha posted 9 patches 1 week, 4 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260714024557.204578-1-anisinha@redhat.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, Stefano Garzarella <sgarzare@redhat.com>, Ani Sinha <anisinha@redhat.com>, Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>, "Michael S. Tsirkin" <mst@redhat.com>, Cornelia Huck <cohuck@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Zhao Liu <zhao1.liu@intel.com>, Fabiano Rosas <farosas@suse.de>, Laurent Vivier <lvivier@redhat.com>
MAINTAINERS                                   |  13 +
backends/igvm-cfg.c                           |   3 +
backends/igvm.c                               |  99 +++--
docs/specs/index.rst                          |   1 +
docs/specs/vmlaunchupdate.rst                 | 172 ++++++++
hw/misc/meson.build                           |   3 +
hw/misc/trace-events                          |   6 +
hw/misc/vmlaunchupdate.c                      | 307 +++++++++++++
include/hw/misc/vmlaunchupdate.h              |  38 ++
.../standard-headers/misc/vmlaunchupdate.h    |  73 ++++
include/system/igvm-internal.h                |   8 +-
include/system/igvm.h                         |   1 +
tests/data/igvm/README                        |  24 ++
tests/data/igvm/hello.igvm                    | Bin 0 -> 137112 bytes
tests/data/igvm/qemuinit.igvm                 | Bin 0 -> 137112 bytes
tests/functional/aarch64/meson.build          |   1 +
.../aarch64/test_vm_launch_update_aarch.py    |  33 ++
tests/functional/x86_64/meson.build           |   1 +
.../x86_64/test_vm_launch_update.py           |  48 +++
tests/qtest/launchupdate-test.c               | 408 ++++++++++++++++++
tests/qtest/meson.build                       |   2 +
21 files changed, 1208 insertions(+), 33 deletions(-)
create mode 100644 docs/specs/vmlaunchupdate.rst
create mode 100644 hw/misc/vmlaunchupdate.c
create mode 100644 include/hw/misc/vmlaunchupdate.h
create mode 100644 include/standard-headers/misc/vmlaunchupdate.h
create mode 100644 tests/data/igvm/README
create mode 100644 tests/data/igvm/hello.igvm
create mode 100644 tests/data/igvm/qemuinit.igvm
create mode 100755 tests/functional/aarch64/test_vm_launch_update_aarch.py
create mode 100755 tests/functional/x86_64/test_vm_launch_update.py
create mode 100644 tests/qtest/launchupdate-test.c
[PATCH v2 0/9] Introducing guest driven VM launch update mechanism (BYOF interface)
Posted by Ani Sinha 1 week, 4 days ago
This is the resurrection of the work that was previously discussed here:
https://lists.endsoftwarepatents.org/archive/html/qemu-devel/2025-03/msg05872.html

This relates to the 'bring your own firmware' work that we are driving at Red Hat,
now with IGVM support.

The patchset includes a spec doc that has more details.

This patchset implements the hypervisor interface using fw-cfg. Using this interface, the guest
can pass its own IGVM file to the hypervisor. Upon reset, the hypervisor re-initializes the guest
using the IGVM file the guest provided.  This is useful in order to have deterministic and trustworthy
launch measurements, mostly for the cloud confidential guest deployments.

This patchset has added functional and unit tests that exercize the hypervisor interface. It has been
tested for both confidential guests and non-confidential guests. Gerd has also independently tested
the patchset.

Changelog:
v2:
 - API definitions moved to a separate userland header file.
 - A new ctrl flag is added that will restore original host provided IGVM. Tests for the same are added as well.
 - doc updates that describe how the interface works with the new ctrl flag set.
 - A memory corruption issue is fixed.
 - total size of test IGVM files reduced to 270 KB.
 - other review comments addressed.
 - tags added.

CC: Alex Graf <graf@amazon.com>
CC: Gerd Hoffman <kraxel@redhat.com>
CC: qemu-devel@nongnu.org


Ani Sinha (6):
  hw/misc/vmlaunchupdate: add api header
  hw/misc/vmlaunchupdate: Introduce hypervisor fw-cfg interface support
  docs/spec: Add a specification document for vm-launch-update device
  tests/qtest: Add small igvm files for testing purpose
  Add functional and unit tests for the vm-launch-update device
  Update MAINTAINERS

Gerd Hoffmann (3):
  igvm: store IgvmCfg pointer in QIgvm
  igvm: track memory regions
  igvm: cleanup memory regions

 MAINTAINERS                                   |  13 +
 backends/igvm-cfg.c                           |   3 +
 backends/igvm.c                               |  99 +++--
 docs/specs/index.rst                          |   1 +
 docs/specs/vmlaunchupdate.rst                 | 172 ++++++++
 hw/misc/meson.build                           |   3 +
 hw/misc/trace-events                          |   6 +
 hw/misc/vmlaunchupdate.c                      | 307 +++++++++++++
 include/hw/misc/vmlaunchupdate.h              |  38 ++
 .../standard-headers/misc/vmlaunchupdate.h    |  73 ++++
 include/system/igvm-internal.h                |   8 +-
 include/system/igvm.h                         |   1 +
 tests/data/igvm/README                        |  24 ++
 tests/data/igvm/hello.igvm                    | Bin 0 -> 137112 bytes
 tests/data/igvm/qemuinit.igvm                 | Bin 0 -> 137112 bytes
 tests/functional/aarch64/meson.build          |   1 +
 .../aarch64/test_vm_launch_update_aarch.py    |  33 ++
 tests/functional/x86_64/meson.build           |   1 +
 .../x86_64/test_vm_launch_update.py           |  48 +++
 tests/qtest/launchupdate-test.c               | 408 ++++++++++++++++++
 tests/qtest/meson.build                       |   2 +
 21 files changed, 1208 insertions(+), 33 deletions(-)
 create mode 100644 docs/specs/vmlaunchupdate.rst
 create mode 100644 hw/misc/vmlaunchupdate.c
 create mode 100644 include/hw/misc/vmlaunchupdate.h
 create mode 100644 include/standard-headers/misc/vmlaunchupdate.h
 create mode 100644 tests/data/igvm/README
 create mode 100644 tests/data/igvm/hello.igvm
 create mode 100644 tests/data/igvm/qemuinit.igvm
 create mode 100755 tests/functional/aarch64/test_vm_launch_update_aarch.py
 create mode 100755 tests/functional/x86_64/test_vm_launch_update.py
 create mode 100644 tests/qtest/launchupdate-test.c

-- 
2.42.0