1 /* 2 * QEMU IGVM interface 3 * 4 * Copyright (C) 2024 SUSE 5 * 6 * Authors: 7 * Roy Hopkins <roy.hopkins@randomman.co.uk> 8 * 9 * SPDX-License-Identifier: GPL-2.0-or-later 10 */ 11 12 #ifndef QEMU_IGVM_CFG_H 13 #define QEMU_IGVM_CFG_H 14 15 #include "qom/object.h" 16 17 typedef struct IgvmCfg { 18 ObjectClass parent_class; 19 20 /* 21 * filename: Filename that specifies a file that contains the configuration 22 * of the guest in Independent Guest Virtual Machine (IGVM) 23 * format. 24 */ 25 char *filename; 26 } IgvmCfg; 27 28 typedef struct IgvmCfgClass { 29 ObjectClass parent_class; 30 31 /* 32 * If an IGVM filename has been specified then process the IGVM file. 33 * Performs a no-op if no filename has been specified. 34 * If onlyVpContext is true then only the IGVM_VHT_VP_CONTEXT entries 35 * in the IGVM file will be processed, allowing information about the 36 * CPU state to be determined before processing the entire file. 37 * 38 * Returns 0 for ok and -1 on error. 39 */ 40 int (*process)(IgvmCfg *cfg, ConfidentialGuestSupport *cgs, 41 bool onlyVpContext, Error **errp); 42 43 } IgvmCfgClass; 44 45 #define TYPE_IGVM_CFG "igvm-cfg" 46 47 OBJECT_DECLARE_TYPE(IgvmCfg, IgvmCfgClass, IGVM_CFG) 48 49 #endif 50