diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2021-06-24 12:38:21 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-07-09 18:20:27 +0200 |
commit | ab0cfc3dcbe763ae615a284dbc68997af933ff9c (patch) | |
tree | 1507a7e6d5fa7cdd06869c9fd746dbe7032e89f0 /util/module.c | |
parent | d7795d3cc52fa8c297908912a9541ecd4f810f03 (diff) | |
download | qemu-ab0cfc3dcbe763ae615a284dbc68997af933ff9c.zip qemu-ab0cfc3dcbe763ae615a284dbc68997af933ff9c.tar.gz qemu-ab0cfc3dcbe763ae615a284dbc68997af933ff9c.tar.bz2 |
modules: check arch on qom lookup
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>
Diffstat (limited to 'util/module.c')
-rw-r--r-- | util/module.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/util/module.c b/util/module.c index 065aed0..6bb4ad9 100644 --- a/util/module.c +++ b/util/module.c @@ -329,6 +329,9 @@ void module_load_qom_one(const char *type) 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); @@ -349,6 +352,9 @@ void module_load_qom_all(void) if (!modinfo->objs) { continue; } + if (!module_check_arch(modinfo)) { + continue; + } module_load_one("", modinfo->name, false); } module_loaded_qom_all = true; |