VM launch update is a mechanism where the virtual machines can use IGVM file bundle to boot into a trusted execution environment without having to depend on a untrusted party to provide the IGVM bundle or firmware image. This is particularly useful for confidential virtual machines that are deployed in the cloud where the tenant and the cloud provider are two different entities. In this scenario, virtual machines can bring their own trusted IGVM file containing a trusted firmware image bundled as a part of their filesystem and then use this hypervisor interface to update to a trusted and deterministic boot state. This also allows the guests to have a consistent measurements on the firmware image. Currently, this mechanism only works if the VM was started with IGVM in the first place. This change introduces support for the fw-cfg based hypervisor interface and the corresponding device. The interface is made generic enough so that guests are free to use their own ABI to pass required information between initial and trusted execution contexts (where they are running their own trusted boot state) without the hypervisor getting involved in between. Currently, this device is only supported for x86_64 machines. Presence of IGVM host libraries is also required for parsing IGVM files. Hence, the device cannot be initialized for other machine types or hosts where IGVM support is not present. Trying to initialize it for arm for example will lead to failure: $ ./qemu-system-arm -device vm-launch-update -machine virt qemu-system-arm: -device vm-launch-update: This machine does not support vm-launch-update device A document detailing the specification is added in a subsequent patch. Please see docs/specs/vmlaunchupdate.rst. Functional and qtests are added in a subsequent patch. CC: Alex Graf <graf@amazon.com> CC: Gerd Hoffman <kraxel@redhat.com> Reviewed-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Alexander Graf <graf@amazon.com> Signed-off-by: Ani Sinha <anisinha@redhat.com> Message-ID: <20260817142010.80693-8-anisinha@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
39 lines
912 B
C
39 lines
912 B
C
/*
|
|
* Guest driven VM launch state update device via IGVM.
|
|
* For details and specification, please look at docs/specs/vmlaunchupdate.rst.
|
|
*
|
|
* Copyright (C) 2026 Red Hat, Inc.
|
|
*
|
|
* Authors: Ani Sinha <anisinha@redhat.com>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*
|
|
*/
|
|
#ifndef VMLAUNCHUPDATE_H
|
|
#define VMLAUNCHUPDATE_H
|
|
|
|
#include "hw/core/qdev.h"
|
|
#include "qom/object.h"
|
|
#include "qemu/units.h"
|
|
#include "system/igvm-cfg.h"
|
|
#include "standard-headers/misc/vmlaunchupdate.h"
|
|
|
|
#define TYPE_VMLAUNCHUPDATE "vm-launch-update"
|
|
|
|
typedef struct VMLaunchUpdateState {
|
|
DeviceState parent_obj;
|
|
VMLaunchUpdate launch_update;
|
|
bool disabled;
|
|
bool host_igvm_on_reset;
|
|
ResettableState reset_state;
|
|
} VMLaunchUpdateState;
|
|
|
|
|
|
typedef struct VMLaunchUpdateStateClass {
|
|
ObjectClass parent_class;
|
|
} VMLaunchUpdateStateClass;
|
|
|
|
OBJECT_DECLARE_SIMPLE_TYPE(VMLaunchUpdateState, VMLAUNCHUPDATE);
|
|
|
|
#endif
|