Pass the full MachineState to the IGVM backend during file processing, instead of just the ConfidentialGuestSupport struct (which is a member of the MachineState). This replaces the cgs parameter of qigvm_process_file() with the machine state to make it available in the IGVM processing context. We will use it later to generate MADT data there to pass to the guest as IGVM parameter. Reviewed-by: Luigi Leonardi <leonardi@redhat.com> Signed-off-by: Oliver Steffen <osteffen@redhat.com> Message-ID: <20260130054714.715928-8-osteffen@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
41 lines
1002 B
C
41 lines
1002 B
C
/*
|
|
* QEMU IGVM interface
|
|
*
|
|
* Copyright (C) 2024 SUSE
|
|
*
|
|
* Authors:
|
|
* Roy Hopkins <roy.hopkins@randomman.co.uk>
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#ifndef QEMU_IGVM_CFG_H
|
|
#define QEMU_IGVM_CFG_H
|
|
|
|
#include "hw/core/boards.h"
|
|
#include "qemu/typedefs.h"
|
|
#include "qom/object.h"
|
|
|
|
typedef struct IgvmCfgClass {
|
|
ObjectClass parent_class;
|
|
|
|
/*
|
|
* If an IGVM filename has been specified then process the IGVM file.
|
|
* Performs a no-op if no filename has been specified.
|
|
* If onlyVpContext is true then only the IGVM_VHT_VP_CONTEXT entries
|
|
* in the IGVM file will be processed, allowing information about the
|
|
* CPU state to be determined before processing the entire file.
|
|
*
|
|
* Returns 0 for ok and -1 on error.
|
|
*/
|
|
int (*process)(IgvmCfg *cfg, MachineState *machine_state,
|
|
bool onlyVpContext, Error **errp);
|
|
|
|
} IgvmCfgClass;
|
|
|
|
#define TYPE_IGVM_CFG "igvm-cfg"
|
|
|
|
OBJECT_DECLARE_TYPE(IgvmCfg, IgvmCfgClass, IGVM_CFG)
|
|
|
|
#endif
|