Hi,
> This variable keeps track of all modules enabled for a target
> architecture. This will be used in modinfo to refine the
> architectures that can really load the .so to avoid errors.
I think this is the wrong approach. The reason why modules are
not loading is typically *not* the architecture, but a feature
or subsystem the device needs not being compiled in. Often the
subsystem is a bus (pci, usb, ccw), but there are also other
cases (virtio, vga).
We can stick that into modinfo, simliar to module_dep() but for bits
provided by core qemu instead of other modules. i.e. add something
along the lines of ...
module_need(BUS_PCI);
... to the modules, store that in modinfo and check it before trying
to load.
That would also allow to remove hacks like commit 2dd9d8cfb4f3 ("s390x:
add have_virtio_ccw")
take care,
Gerd