mirror of
https://github.com/qemu/qemu.git
synced 2026-04-05 22:00:58 +00:00
igvm: fix build when igvm is not installed in a well known path
`stubs/igvm.c` includes `igvm-internal.h`, that in turn includes the igvm library.
This is required just for the QIgvm declaration and creates an
unnecessary dependency on the library.
Since igvm is not listed as a dependency of stubs, this results in build
failing when the library is not installed in a "well known" path of the
system.
Add a forward declaration for QIgvm and move the definition of
`qigvm_directive_madt` to `igvm.h` so that we can drop `igvm-internal.h` from
`stubs/igvm.c`.
Fixes: dea1f68a5c ("igvm: Fill MADT IGVM parameter field on x86_64")
Suggested-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Luigi Leonardi <leonardi@redhat.com>
Message-ID: <20260309-master-v2-1-7e02f07a1096@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
committed by
Gerd Hoffmann
parent
c221dd7746
commit
5c45204e34
@@ -102,6 +102,7 @@ typedef struct QEMUSGList QEMUSGList;
|
||||
typedef struct QemuSpin QemuSpin;
|
||||
typedef struct QEMUTimer QEMUTimer;
|
||||
typedef struct QEMUTimerListGroup QEMUTimerListGroup;
|
||||
typedef struct QIgvm QIgvm;
|
||||
typedef struct QList QList;
|
||||
typedef struct QNull QNull;
|
||||
typedef struct QNum QNum;
|
||||
|
||||
@@ -42,7 +42,7 @@ typedef struct QIgvmParameterData {
|
||||
* QIgvm contains the information required during processing of a single IGVM
|
||||
* file.
|
||||
*/
|
||||
typedef struct QIgvm {
|
||||
struct QIgvm {
|
||||
IgvmHandle file;
|
||||
MachineState *machine_state;
|
||||
ConfidentialGuestSupportClass *cgsc;
|
||||
@@ -67,16 +67,11 @@ typedef struct QIgvm {
|
||||
unsigned region_start_index;
|
||||
unsigned region_last_index;
|
||||
unsigned region_page_count;
|
||||
} QIgvm;
|
||||
};
|
||||
|
||||
IgvmHandle qigvm_file_init(char *filename, Error **errp);
|
||||
|
||||
QIgvmParameterData*
|
||||
qigvm_find_param_entry(QIgvm *igvm, uint32_t parameter_area_index);
|
||||
|
||||
/*
|
||||
* IGVM parameter handlers
|
||||
*/
|
||||
int qigvm_directive_madt(QIgvm *ctx, const uint8_t *header_data, Error **errp);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -27,4 +27,9 @@ int qigvm_x86_get_mem_map_entry(int index,
|
||||
int qigvm_x86_set_vp_context(void *data, int index,
|
||||
Error **errp);
|
||||
|
||||
/*
|
||||
* IGVM parameter handlers
|
||||
*/
|
||||
int qigvm_directive_madt(QIgvm *ctx, const uint8_t *header_data, Error **errp);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "qemu/osdep.h"
|
||||
|
||||
#include "system/igvm.h"
|
||||
#include "system/igvm-internal.h"
|
||||
|
||||
int qigvm_x86_get_mem_map_entry(int index,
|
||||
ConfidentialGuestMemoryMapEntry *entry,
|
||||
|
||||
Reference in New Issue
Block a user