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 * 35 * Returns 0 for ok and -1 on error. 36 */ 37 int (*process)(IgvmCfg *cfg, ConfidentialGuestSupport *cgs, 38 Error **errp); 39 40 } IgvmCfgClass; 41 42 #define TYPE_IGVM_CFG "igvm-cfg" 43 44 OBJECT_DECLARE_TYPE(IgvmCfg, IgvmCfgClass, IGVM_CFG) 45 46 #endif 47