| 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 "hw/core/boards.h" |
| 16 | #include "qemu/typedefs.h" |
| 17 | #include "qom/object.h" |
| 18 | |
| 19 | typedef struct IgvmCfgClass { |
| 20 | ObjectClass parent_class; |
| 21 | |
| 22 | /* |
| 23 | * If an IGVM filename has been specified then process the IGVM file. |
| 24 | * Performs a no-op if no filename has been specified. |
| 25 | * If onlyVpContext is true then only the IGVM_VHT_VP_CONTEXT entries |
| 26 | * in the IGVM file will be processed, allowing information about the |
| 27 | * CPU state to be determined before processing the entire file. |
| 28 | * |
| 29 | * Returns 0 for ok and -1 on error. |
| 30 | */ |
| 31 | int (*process)(IgvmCfg *cfg, MachineState *machine_state, |
| 32 | bool onlyVpContext, Error **errp); |
| 33 | |
| 34 | } IgvmCfgClass; |
| 35 | |
| 36 | #define TYPE_IGVM_CFG "igvm-cfg" |
| 37 | |
| 38 | OBJECT_DECLARE_TYPE(IgvmCfg, IgvmCfgClass, IGVM_CFG) |
| 39 | |
| 40 | #endif |