On Thu, Jun 10, 2021 at 02:57:21PM +0200, Gerd Hoffmann wrote: > Hi, > > > > for (modlist = modinfo->list; modlist != NULL; modlist = > > > modlist->next) { > > > + if (modlist->value->has_arch) { > > > + if (strcmp(modlist->value->name, module_name) == 0) { > > > + if (!module_arch || > > > + strcmp(modlist->value->arch, module_arch) != 0) { > > > + return false; > > > + } > > > + } > > > + } > > > > I have a little hard time following the code paths, but IIUC, with this > > change, instead of "module.so" we would have multiple copies of something > > like "module-$arch.so" ? > > Not yet with this series, but easily doable on top of this (see other > patch series sent today). > > > Then we load them all, read their modinfo section > > and discard the ones with non-matching arch ? > > No. There is a utility reading the modinfo section (patch #2), write > out the info as json (patch #2 has the schema), then qemu will read that > json file (patch #13) ...
Ah ok, missed that. Is the JSON file completely static, listing all modules that were built regardless of whether they are currently installed, or would it need to be refreshed when installing/uninstalling RPMs with modules ? I would think we can do the former and simply handle missing modules on disk fairly easily Regards, Daniel -- |: https://berrange.com -o- https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o- https://fstop138.berrange.com :| |: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|