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) ... > for arch specific modules. That would let us load only the modules we know > are applicable for the system target arch and not need this post-load > filtering from metadata. ... so it's pre-load filtering, not post-load. take care, Gerd