typedefs: move QIgvm out of typedefs.h
PATCH 1/1 typedefs: move QIgvm out of typedefs.h
Typedefs.h should only be used for really core types; QIgvm is just an opaque struct that is defined in system/igvm-internal.h, and the typedef itself can be placed simply in system/igvm.h.
--- include/qemu/typedefs.h | 1 - include/system/igvm.h | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-)
include/qemu/typedefs.h +0 -1
@@ -102,7 +102,6 @@ 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 ;
include/system/igvm.h +2 -1
@@ -13,10 +13,11 @@#define BACKENDS_IGVM_H #include "hw/core/boards.h" -#include "qemu/typedefs.h" #include "system/confidential-guest-support.h" #include "qapi/error.h" +typedef struct QIgvm QIgvm ; +int qigvm_process_file (IgvmCfg *igvm,MachineState *machine_state,bool onlyVpContext,Error **errp);
Signature · 1 line
2.53.0
Quoted 41 lines · Paolo Bonzini
Typedefs.hshould only be used for really core types; QIgvm is just an opaque struct that is defined insystem/igvm-internal.h, and the typedef itself can be placed simply insystem/igvm.h.Signed-off-by Paolo Bonzini <[email protected]>---
include/qemu/typedefs.h| 1 -include/system/igvm.h| 3 ++-2 files changed, 2 insertions(+), 2 deletions(-)include/qemu/typedefs.h +0
-1@@ -102,7 +102,6 @@ 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 ;include/system/igvm.h +2
-1@@ -13,10 +13,11 @@#define BACKENDS_IGVM_H #include "hw/core/boards.h" -#include "qemu/typedefs.h" #include "system/confidential-guest-support.h" #include "qapi/error.h" +typedef struct QIgvm QIgvm ; +int qigvm_process_file (IgvmCfg *igvm,MachineState *machine_state,bool onlyVpContext,Error **errp);Signature · 1 line
2.53.0
oops :) Thanks Paolo!
I wonder if we should move IgvmCfg as well?
Quoted 3 lines
oops :) Thanks Paolo!
I wonder if we should move IgvmCfg as well?
Yes, why not. target/i386/igvm.c does not include system/igvm-cfg.h so one has to make some choices unlike for this patch. It's probably easiest to just merge igvm-cfg.h and igvm.h into a single file.
Paolo
Quoted 2 lines
Reviewed-by Luigi Leonardi <[email protected]>
Quoted 9 lines · Paolo Bonzini
Typedefs.hshould only be used for really core types; QIgvm is just an opaque struct that is defined insystem/igvm-internal.h, and the typedef itself can be placed simply insystem/igvm.h.Signed-off-by Paolo Bonzini <[email protected]>--- include/qemu/typedefs.h | 1 - include/system/igvm.h | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-)