@@ -380,6 +380,9 @@ void module_load_qom_one(const char *type)
if (!modlist->value->has_objs) {
continue;
}
+ if (!module_check_arch(modlist->value)) {
+ continue;
+ }
for (sl = modlist->value->objs; sl != NULL; sl = sl->next) {
if (strcmp(type, sl->value) == 0) {
module_load_one("", modlist->value->name, false);
@@ -403,6 +406,9 @@ void module_load_qom_all(void)
if (!modlist->value->has_objs) {
continue;
}
+ if (!module_check_arch(modlist->value)) {
+ continue;
+ }
module_load_one("", modlist->value->name, false);
}
module_loaded_qom_all = true;
With target-specific modules we can have multiple modules implementing the same object. Therefore we have to check the target arch on lookup to find the correct module. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- util/module.c | 6 ++++++ 1 file changed, 6 insertions(+)