All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] modules: Improve modinfo.c architecture support
@ 2021-09-17  1:29 Jose R. Ziviani
  2021-09-17  1:29 ` [PATCH 1/2] meson: introduce modules_arch Jose R. Ziviani
  2021-09-17  1:29 ` [PATCH 2/2] modules: use a list of supported arch for each module Jose R. Ziviani
  0 siblings, 2 replies; 13+ messages in thread
From: Jose R. Ziviani @ 2021-09-17  1:29 UTC (permalink / raw)
  To: qemu-devel; +Cc: pbonzini, kraxel, Jose R. Ziviani

When building a single target, the build system detects the architecture
and generates a modinfo.c with modules related to that arch only.
However, when more than one target is built, modinfo.c is generated with
modules available for each architecture - without any way to know what
arch supports what.

The problem is when executing the target, it will try to load modules
that is not supported by it and will throw errors to users, for
instance:

$ ./configure --enable-modules # all targets
$ ./qemu-system-avr -nodefaults -display none -accel tcg -M none -device help | head
Failed to open module: /.../hw-display-qxl.so: undefined symbol: vga_ioport_read
Failed to open module: /.../hw-display-virtio-gpu.so: undefined symbol: virtio_vmstate_info
Failed to open module: /.../hw-display-virtio-gpu.so: undefined symbol: virtio_vmstate_info
Failed to open module: /.../hw-display-virtio-gpu-gl.so: undefined symbol: virtio_gpu_ctrl_response
Failed to open module: /.../hw-display-virtio-gpu-pci.so: undefined symbol: virtio_instance_init_common
Failed to open module: /.../hw-display-virtio-gpu-pci.so: undefined symbol: virtio_instance_init_common
Failed to open module: /.../hw-display-virtio-gpu-pci-gl.so: undefined symbol: virtio_instance_init_common
Failed to open module: /.../hw-display-virtio-vga.so: undefined symbol: vmstate_vga_common
Failed to open module: /.../hw-display-virtio-vga.so: undefined symbol: vmstate_vga_common
Failed to open module: /.../hw-display-virtio-vga-gl.so: undefined symbol: have_vga
Failed to open module: /.../hw-usb-smartcard.so: undefined symbol: ccid_card_ccid_attach
Failed to open module: /.../hw-usb-redirect.so: undefined symbol: vmstate_usb_device
Failed to open module: /.../hw-usb-host.so: undefined symbol: vmstate_usb_device
...

$ ./qemu-system-s390x -nodefaults -display none -accel tcg -M none -device help | head 
Failed to open module: /.../hw-display-qxl.so: undefined symbol: vga_ioport_read
Failed to open module: /.../hw-display-virtio-vga.so: undefined symbol: vmstate_vga_common
Failed to open module: /.../hw-display-virtio-vga.so: undefined symbol: vmstate_vga_common
Failed to open module: /.../hw-display-virtio-vga-gl.so: undefined symbol: have_vga
Failed to open module: /.../hw-usb-smartcard.so: undefined symbol: ccid_card_ccid_attach
Failed to open module: /.../hw-usb-redirect.so: undefined symbol: vmstate_usb_device
Failed to open module: /.../hw-usb-host.so: undefined symbol: vmstate_usb_device

This patchset tries to improve by collecting the modules are currently
enabled for each target, obtaining information in meson from kconfig
and passing that to modinfo.c, which now uses a list to store supported
architectures for each module.

$ ./qemu-system-s390x -nodefaults -display none -accel tcg -M none -device help | head
Controller/Bridge/Hub devices:
name "pci-bridge", bus PCI, desc "Standard PCI Bridge"
name "pci-bridge-seat", bus PCI, desc "Standard PCI Bridge (multiseat)"
...

$ ./qemu-system-avr -nodefaults -display none -accel tcg -M none -device help | head
...
Misc devices:
name "guest-loader", desc "Guest Loader"
name "loader", desc "Generic Loader"

Jose R. Ziviani (2):
  meson: introduce modules_arch
  modules: use a list of supported arch for each module

 hw/display/meson.build      | 48 +++++++++++++++++++++++++++++++++++++
 hw/usb/meson.build          | 36 ++++++++++++++++++++++++++++
 include/qemu/module.h       |  2 +-
 meson.build                 | 19 +++++++++++----
 scripts/modinfo-collect.py  | 10 ++++++++
 scripts/modinfo-generate.py |  7 +++---
 util/module.c               | 18 ++++++++++----
 7 files changed, 125 insertions(+), 15 deletions(-)

-- 
2.33.0



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

end of thread, other threads:[~2021-09-23  7:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-17  1:29 [PATCH 0/2] modules: Improve modinfo.c architecture support Jose R. Ziviani
2021-09-17  1:29 ` [PATCH 1/2] meson: introduce modules_arch Jose R. Ziviani
2021-09-17  7:14   ` Gerd Hoffmann
2021-09-17 13:06     ` Jose R. Ziviani
2021-09-20  5:15       ` Gerd Hoffmann
2021-09-20 13:02         ` Jose R. Ziviani
2021-09-20 19:03           ` Paolo Bonzini
2021-09-21 13:46             ` Jose R. Ziviani
2021-09-23  7:18               ` Paolo Bonzini
2021-09-21  5:25           ` Gerd Hoffmann
2021-09-21 13:35             ` Jose R. Ziviani
2021-09-21 15:34               ` Gerd Hoffmann
2021-09-17  1:29 ` [PATCH 2/2] modules: use a list of supported arch for each module Jose R. Ziviani

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.