Skip to contentSkip to conversation

hw/arm/virt: Include 'system/system.h'

PATCH Superseded Cédric Le Goater 3 participants 5 messages Jul 31, 2025 – Aug 5, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/arm/virt: Include 'system/system.h'

hw/arm/virt.c should include 'system/system.h' for :

serial_hd()
qemu_add_machine_init_done_notifier()

---
 hw/arm/virt.c | 1 +
 1 file changed, 1 insertion(+)
hw/arm/virt.c +1 -0
index ef6be3660f5fb38da84235c32dc2d13a5c61889c..e1b6241f7bee4c2fddde31c512561e87229cebc2 100644
@@ -50,6 +50,7 @@
 #include "system/kvm.h"
 #include "system/hvf.h"
 #include "system/qtest.h"
+#include "system/system.h"
 #include "hw/loader.h"
 #include "qapi/error.h"
 #include "qemu/bitops.h"
Signature · 1 line
2.50.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 16 lines · Cédric Le Goater

hw/arm/virt.c should include 'system/system.h' for :

serial_hd()
qemu_add_machine_init_done_notifier()

---
 hw/arm/virt.c | 1 +
 1 file changed, 1 insertion(+)
hw/arm/virt.c +0 -0
index ef6be3660f5fb38da84235c32dc2d13a5c61889c..e1b6241f7bee4c2fddde31c512561e87229cebc2 100644

hw/arm/virt.c line 56

Quoted 7 lines
hw/arm/virt.c +1 -0
@@ -50,6 +50,7 @@
 #include "system/kvm.h"
 #include "system/hvf.h"
 #include "system/qtest.h"
+#include "system/system.h"
 #include "hw/loader.h"
 #include "qapi/error.h"
 #include "qemu/bitops.h"

Presumably we're currently pulling in this header indirectly via some other header (the vfio ones)? Might be helpful to say which.

If this is a dependency for your vfio-platform removal patches, feel free to include it in there.

-- PMM

#2 lore raw
Quoted 12 lines · Peter Maydell
Quoted 11 lines · Cédric Le Goater

hw/arm/virt.c should include 'system/system.h' for :

   serial_hd()
   qemu_add_machine_init_done_notifier()
---
  hw/arm/virt.c | 1 +
  1 file changed, 1 insertion(+)
Quoted 15 lines

hw/arm/virt.c line 56

Quoted 12 lines
hw/arm/virt.c +1 -0
index ef6be3660f5fb38da84235c32dc2d13a5c61889c..e1b6241f7bee4c2fddde31c512561e87229cebc2 100644
@@ -50,6 +50,7 @@
  #include "system/kvm.h"
  #include "system/hvf.h"
  #include "system/qtest.h"
+#include "system/system.h"
  #include "hw/loader.h"
  #include "qapi/error.h"
  #include "qemu/bitops.h"

Presumably we're currently pulling in this header
indirectly via some other header (the vfio ones)?

yes.

Quoted 4 lines

Might be helpful to say which.

If this is a dependency for your vfio-platform removal patches, feel free to include it in there.

I will do that and improve the commit log.

Quoted 5 lines

-- PMM

Thanks,

C.

Reviewed-by on v1 1/1
#3 lore raw
In reply to Cédric Le Goater
Quoted 3 lines · Cédric Le Goater

hw/arm/virt.c should include 'system/system.h' for :

   serial_hd()

3 other files miss it:

$ git grep -L system/system $(git grep -wl serial_hd)
hw/arm/virt.c
hw/isa/isa-superio.c
hw/mips/loongson3_virt.c
hw/mips/malta.c
include/system/system.h

Anyhow,

Quoted 19 lines

qemu_add_machine_init_done_notifier()

---
  hw/arm/virt.c | 1 +
  1 file changed, 1 insertion(+)
hw/arm/virt.c +1 -0
index ef6be3660f5fb38da84235c32dc2d13a5c61889c..e1b6241f7bee4c2fddde31c512561e87229cebc2 100644
@@ -50,6 +50,7 @@
  #include "system/kvm.h"
  #include "system/hvf.h"
  #include "system/qtest.h"
+#include "system/system.h"
  #include "hw/loader.h"
  #include "qapi/error.h"
  #include "qemu/bitops.h"
#4 lore raw
Quoted 5 lines · Philippe Mathieu-Daudé
Quoted 3 lines · Cédric Le Goater

hw/arm/virt.c should include 'system/system.h' for :

   serial_hd()

Quoted 8 lines

3 other files miss it:

$ git grep -L system/system $(git grep -wl serial_hd)
hw/arm/virt.c
hw/isa/isa-superio.c
hw/mips/loongson3_virt.c
hw/mips/malta.c
include/system/system.h

OK. This deserves a v2. Will work on it.

Thanks,

C.