[PATCH 0/9] [RFC] store module metadata in .modinfo elf section

Gerd Hoffmann posted 9 patches 2 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/next-importer-push tags/patchew/20210602091727.1023563-1-kraxel@redhat.com
Maintainers: "Marc-André Lureau" <marcandre.lureau@redhat.com>, Halil Pasic <pasic@linux.ibm.com>, Cornelia Huck <cohuck@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Samuel Thibault <samuel.thibault@ens-lyon.org>, Thomas Huth <thuth@redhat.com>, Christian Borntraeger <borntraeger@de.ibm.com>, Paolo Bonzini <pbonzini@redhat.com>, David Hildenbrand <david@redhat.com>
include/qemu/module.h           |  18 ++++
audio/spiceaudio.c              |   2 +
chardev/baum.c                  |   1 +
chardev/spice.c                 |   4 +
hw/display/qxl.c                |   4 +
hw/display/vhost-user-gpu-pci.c |   1 +
hw/display/vhost-user-gpu.c     |   1 +
hw/display/vhost-user-vga.c     |   1 +
hw/display/virtio-gpu-base.c    |   1 +
hw/display/virtio-gpu-gl.c      |   3 +
hw/display/virtio-gpu-pci-gl.c  |   3 +
hw/display/virtio-gpu-pci.c     |   2 +
hw/display/virtio-gpu.c         |   1 +
hw/display/virtio-vga-gl.c      |   3 +
hw/display/virtio-vga.c         |   2 +
hw/s390x/virtio-ccw-gpu.c       |   3 +
hw/usb/ccid-card-emulated.c     |   1 +
hw/usb/ccid-card-passthru.c     |   1 +
hw/usb/redirect.c               |   1 +
qemu-modinfo.c                  | 182 ++++++++++++++++++++++++++++++++
ui/egl-headless.c               |   4 +
ui/gtk.c                        |   4 +
ui/sdl2.c                       |   4 +
ui/spice-app.c                  |   3 +
ui/spice-core.c                 |   4 +
meson.build                     |   3 +
26 files changed, 257 insertions(+)
create mode 100644 qemu-modinfo.c
[PATCH 0/9] [RFC] store module metadata in .modinfo elf section
Posted by Gerd Hoffmann 2 years, 10 months ago
This patch series stores module metadata in a .modinfo elf section and
adds a utility to read it.  For now the utility just prints the meta
data.  The plan is to store this in some file and have qemu read it.

Background is that the hard-coded lists in util/module.c are somewhat
ugly and also wouldn't work very well with a large number of modules,
so I'm looking for something else.

Posting this now to collect feedback on the apprach.
Should I continue this?
Better ideas?
Other comments & suggestions?

take care,
  Gerd

Gerd Hoffmann (9):
  Add module metadata macros, add qxl module annotations
  add qemu-modinfo utility
  virtio-gpu module annotations
  chardev module annotations
  audio module annotations
  usb-redir module annotations
  ccid module annotations
  ui module annotations
  s390x module annotations

 include/qemu/module.h           |  18 ++++
 audio/spiceaudio.c              |   2 +
 chardev/baum.c                  |   1 +
 chardev/spice.c                 |   4 +
 hw/display/qxl.c                |   4 +
 hw/display/vhost-user-gpu-pci.c |   1 +
 hw/display/vhost-user-gpu.c     |   1 +
 hw/display/vhost-user-vga.c     |   1 +
 hw/display/virtio-gpu-base.c    |   1 +
 hw/display/virtio-gpu-gl.c      |   3 +
 hw/display/virtio-gpu-pci-gl.c  |   3 +
 hw/display/virtio-gpu-pci.c     |   2 +
 hw/display/virtio-gpu.c         |   1 +
 hw/display/virtio-vga-gl.c      |   3 +
 hw/display/virtio-vga.c         |   2 +
 hw/s390x/virtio-ccw-gpu.c       |   3 +
 hw/usb/ccid-card-emulated.c     |   1 +
 hw/usb/ccid-card-passthru.c     |   1 +
 hw/usb/redirect.c               |   1 +
 qemu-modinfo.c                  | 182 ++++++++++++++++++++++++++++++++
 ui/egl-headless.c               |   4 +
 ui/gtk.c                        |   4 +
 ui/sdl2.c                       |   4 +
 ui/spice-app.c                  |   3 +
 ui/spice-core.c                 |   4 +
 meson.build                     |   3 +
 26 files changed, 257 insertions(+)
 create mode 100644 qemu-modinfo.c

-- 
2.31.1