Skip to contentSkip to conversation

hw/remote/proxy: Remove dubious 'event_notifier-posix.c' include

PATCH Applied Philippe Mathieu-Daudé 4 participants 5 messages Jun 6, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hw/remote/proxy: Remove dubious 'event_notifier-posix.c' include

event_notifier-posix.c is registered in meson's util_ss[] source set, which is built as libqemuutil.a.p library. Both tools and system emulation binaries are linked with qemuutil, so there is no point in including this source file.

Introduced in commit bd36adb8df ("multi-process: create IOHUB object to handle irq").

---
Note, --enable-multiprocess doesn't seem to be covered in CI.

---
 hw/remote/proxy.c | 1 -
 1 file changed, 1 deletion(-)
hw/remote/proxy.c +0 -1
index 1c7786b52c..2052d721e5 100644
@@ -22,7 +22,6 @@
 #include "qom/object.h"
 #include "qemu/event_notifier.h"
 #include "sysemu/kvm.h"
-#include "util/event_notifier-posix.c"
 
 static void probe_pci_info(PCIDevice *dev, Error **errp);
 static void proxy_device_reset(DeviceState *dev);
Signature · 1 line
2.38.1
#1 lore raw
Quoted 21 lines · Philippe Mathieu-Daudé

event_notifier-posix.c is registered in meson's util_ss[] source set, which is built as libqemuutil.a.p library. Both tools and system emulation binaries are linked with qemuutil, so there is no point in including this source file.

Introduced in commit bd36adb8df ("multi-process: create IOHUB object to handle irq").

---
Note, --enable-multiprocess doesn't seem to be covered in CI.

---
 hw/remote/proxy.c | 1 -
 1 file changed, 1 deletion(-)
hw/remote/proxy.c +0 -0
index 1c7786b52c..2052d721e5 100644

hw/remote/proxy.c line 25

Quoted 4 lines
hw/remote/proxy.c +0 -1
@@ -22,7 +22,6 @@
 #include "qom/object.h"
 #include "qemu/event_notifier.h"
 #include "sysemu/kvm.h"
-#include "util/event_notifier-posix.c"

Including one .c file from another is definitely very weird; if it is by some chance not incorrect then it needs a big comment describing why it's necessary...

-- PMM

#2 lore raw
Quoted 17 lines · Peter Maydell
Quoted 16 lines · Philippe Mathieu-Daudé

event_notifier-posix.c is registered in meson's util_ss[] source set, which is built as libqemuutil.a.p library. Both tools and system emulation binaries are linked with qemuutil, so there is no point in including this source file.

Introduced in commit bd36adb8df ("multi-process: create IOHUB object to handle irq").

---
Note, --enable-multiprocess doesn't seem to be covered in CI.

---
  hw/remote/proxy.c | 1 -
  1 file changed, 1 deletion(-)
Quoted 13 lines

hw/remote/proxy.c line 25

Quoted 9 lines
hw/remote/proxy.c +0 -1
index 1c7786b52c..2052d721e5 100644
@@ -22,7 +22,6 @@
  #include "qom/object.h"
  #include "qemu/event_notifier.h"
  #include "sysemu/kvm.h"
-#include "util/event_notifier-posix.c"

Including one .c file from another is definitely very weird; if it is by some chance not incorrect then it needs a big comment describing why it's necessary...

Building QEMU configured with --enable-multiprocess still works, so this doesn't look (anymore?) necessary.

$ git grep TYPE_PCI_PROXY_DEV
hw/remote/proxy.c:218:    .name          = TYPE_PCI_PROXY_DEV,
include/hw/remote/proxy.h:17:#define TYPE_PCI_PROXY_DEV "x-pci-proxy-dev"
$ ./qemu-system-x86_64 -device help | fgrep proxy
name "x-pci-proxy-dev", bus PCI
Reviewed-by on v1 1/1
#3 lore raw
In reply to Philippe Mathieu-Daudé
Quoted 20 lines · Philippe Mathieu-Daudé

event_notifier-posix.c is registered in meson's util_ss[] source set, which is built as libqemuutil.a.p library. Both tools and system emulation binaries are linked with qemuutil, so there is no point in including this source file.

Introduced in commit bd36adb8df ("multi-process: create IOHUB object to handle irq").

---
Note, --enable-multiprocess doesn't seem to be covered in CI.

---
  hw/remote/proxy.c | 1 -
  1 file changed, 1 deletion(-)
hw/remote/proxy.c +0 -0
index 1c7786b52c..2052d721e5 100644

hw/remote/proxy.c line 27

Quoted 7 lines
hw/remote/proxy.c +0 -1
@@ -22,7 +22,6 @@
  #include "qom/object.h"
  #include "qemu/event_notifier.h"
  #include "sysemu/kvm.h"
-#include "util/event_notifier-posix.c"
 
  static void probe_pci_info(PCIDevice *dev, Error **errp);
  static void proxy_device_reset(DeviceState *dev);