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>
Reviewed-by: Jose R. Ziviani <jziviani@suse.de>
Message-Id: <
20210624103836.
2382472-20-kraxel@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
if (!modinfo->objs) {
continue;
}
+ if (!module_check_arch(modinfo)) {
+ continue;
+ }
for (sl = modinfo->objs; *sl != NULL; sl++) {
if (strcmp(type, *sl) == 0) {
module_load_one("", modinfo->name, false);
if (!modinfo->objs) {
continue;
}
+ if (!module_check_arch(modinfo)) {
+ continue;
+ }
module_load_one("", modinfo->name, false);
}
module_loaded_qom_all = true;