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 <kra...@redhat.com> --- util/module.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/util/module.c b/util/module.c index 860c257fc56e..35ba3f17cc5f 100644 --- a/util/module.c +++ b/util/module.c @@ -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; -- 2.31.1