All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] typedefs: move QIgvm out of typedefs.h
@ 2026-03-11 16:20 Paolo Bonzini
  2026-03-11 16:54 ` Luigi Leonardi
  2026-03-11 17:07 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 4+ messages in thread
From: Paolo Bonzini @ 2026-03-11 16:20 UTC (permalink / raw)
  To: qemu-devel; +Cc: leonardi

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.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 include/qemu/typedefs.h | 1 -
 include/system/igvm.h   | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index cbe6f7f4c7c..416a8c9acea 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -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;
diff --git a/include/system/igvm.h b/include/system/igvm.h
index f9231f03ec8..64d3542311a 100644
--- a/include/system/igvm.h
+++ b/include/system/igvm.h
@@ -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);
 
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] typedefs: move QIgvm out of typedefs.h
  2026-03-11 16:20 [PATCH] typedefs: move QIgvm out of typedefs.h Paolo Bonzini
@ 2026-03-11 16:54 ` Luigi Leonardi
  2026-03-11 17:11   ` Paolo Bonzini
  2026-03-11 17:07 ` Philippe Mathieu-Daudé
  1 sibling, 1 reply; 4+ messages in thread
From: Luigi Leonardi @ 2026-03-11 16:54 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-devel


On Wed, Mar 11, 2026 at 05:20:45PM +0100, Paolo Bonzini wrote:
>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.
>
>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>---
> include/qemu/typedefs.h | 1 -
> include/system/igvm.h   | 3 ++-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
>diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
>index cbe6f7f4c7c..416a8c9acea 100644
>--- a/include/qemu/typedefs.h
>+++ b/include/qemu/typedefs.h
>@@ -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;
>diff --git a/include/system/igvm.h b/include/system/igvm.h
>index f9231f03ec8..64d3542311a 100644
>--- a/include/system/igvm.h
>+++ b/include/system/igvm.h
>@@ -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);
>
>-- 
>2.53.0

oops :) Thanks Paolo!

I wonder if we should move IgvmCfg as well?

Reviewed-by: Luigi Leonardi <leonardi@redhat.com>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] typedefs: move QIgvm out of typedefs.h
  2026-03-11 16:20 [PATCH] typedefs: move QIgvm out of typedefs.h Paolo Bonzini
  2026-03-11 16:54 ` Luigi Leonardi
@ 2026-03-11 17:07 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-03-11 17:07 UTC (permalink / raw)
  To: Paolo Bonzini, qemu-devel; +Cc: leonardi

On 11/3/26 17:20, Paolo Bonzini wrote:
> 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.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   include/qemu/typedefs.h | 1 -
>   include/system/igvm.h   | 3 ++-
>   2 files changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] typedefs: move QIgvm out of typedefs.h
  2026-03-11 16:54 ` Luigi Leonardi
@ 2026-03-11 17:11   ` Paolo Bonzini
  0 siblings, 0 replies; 4+ messages in thread
From: Paolo Bonzini @ 2026-03-11 17:11 UTC (permalink / raw)
  To: Luigi Leonardi; +Cc: qemu-devel

> 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

> Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-11 17:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11 16:20 [PATCH] typedefs: move QIgvm out of typedefs.h Paolo Bonzini
2026-03-11 16:54 ` Luigi Leonardi
2026-03-11 17:11   ` Paolo Bonzini
2026-03-11 17:07 ` Philippe Mathieu-Daudé

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.