Add a new igvm-internal.h header file. Structs and declarations which
depend on the igvm library header go into that file.
Also declare IgvmCfg in typedefs.h, so the type can be used without
including igvm header files.
Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <
20260126123755.357378-2-kraxel@redhat.com>
#include "qemu/osdep.h"
-#include "system/igvm-cfg.h"
#include "system/igvm.h"
+#include "system/igvm-cfg.h"
+#include "system/igvm-internal.h"
+#include "system/reset.h"
#include "qom/object_interfaces.h"
static char *get_igvm(Object *obj, Error **errp)
#include "qapi/error.h"
#include "qemu/target-info-qapi.h"
#include "system/igvm.h"
+#include "system/igvm-cfg.h"
+#include "system/igvm-internal.h"
#include "system/memory.h"
#include "system/address-spaces.h"
#include "hw/core/cpu.h"
typedef struct HostMemoryBackend HostMemoryBackend;
typedef struct I2CBus I2CBus;
typedef struct I2SCodec I2SCodec;
+typedef struct IgvmCfg IgvmCfg;
typedef struct IOMMUMemoryRegion IOMMUMemoryRegion;
typedef struct ISABus ISABus;
typedef struct ISADevice ISADevice;
#ifndef QEMU_IGVM_CFG_H
#define QEMU_IGVM_CFG_H
+#include "qemu/typedefs.h"
#include "qom/object.h"
-typedef struct IgvmCfg {
- ObjectClass parent_class;
-
- /*
- * filename: Filename that specifies a file that contains the configuration
- * of the guest in Independent Guest Virtual Machine (IGVM)
- * format.
- */
- char *filename;
-} IgvmCfg;
-
typedef struct IgvmCfgClass {
ObjectClass parent_class;
--- /dev/null
+/*
+ * QEMU IGVM private data structures
+ *
+ * Everything which depends on igvm library headers goes here.
+ *
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ */
+
+#ifndef QEMU_IGVM_INTERNAL_H
+#define QEMU_IGVM_INTERNAL_H
+
+#include "qemu/typedefs.h"
+#include "qom/object.h"
+
+struct IgvmCfg {
+ ObjectClass parent_class;
+
+ /*
+ * filename: Filename that specifies a file that contains the configuration
+ * of the guest in Independent Guest Virtual Machine (IGVM)
+ * format.
+ */
+ char *filename;
+};
+
+#endif
#ifndef BACKENDS_IGVM_H
#define BACKENDS_IGVM_H
+#include "qemu/typedefs.h"
#include "system/confidential-guest-support.h"
-#include "system/igvm-cfg.h"
#include "qapi/error.h"
int qigvm_process_file(IgvmCfg *igvm, ConfidentialGuestSupport *cgs,