| 1 | /* |
| 2 | * QEMU IGVM configuration backend for Confidential Guests |
| 3 | * |
| 4 | * Copyright (C) 2023-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 BACKENDS_IGVM_H |
| 13 | #define BACKENDS_IGVM_H |
| 14 | |
| 15 | #include "hw/core/boards.h" |
| 16 | #include "system/confidential-guest-support.h" |
| 17 | #include "qapi/error.h" |
| 18 | |
| 19 | typedef struct QIgvm QIgvm; |
| 20 | |
| 21 | int qigvm_process_file(IgvmCfg *igvm, MachineState *machine_state, |
| 22 | bool onlyVpContext, Error **errp); |
| 23 | void qigvm_cleanup_memory(IgvmCfg *igvm); |
| 24 | |
| 25 | /* x86 native */ |
| 26 | int qigvm_x86_get_mem_map_entry(int index, |
| 27 | ConfidentialGuestMemoryMapEntry *entry, |
| 28 | Error **errp); |
| 29 | int qigvm_x86_set_vp_context(void *data, int index, |
| 30 | Error **errp); |
| 31 | |
| 32 | /* |
| 33 | * IGVM parameter handlers |
| 34 | */ |
| 35 | int qigvm_directive_madt(QIgvm *ctx, const uint8_t *header_data, Error **errp); |
| 36 | |
| 37 | #endif |