[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/4] modules: check arch on qom lookup
From: |
Gerd Hoffmann |
Subject: |
[PATCH 2/4] modules: check arch on qom lookup |
Date: |
Thu, 10 Jun 2021 12:15:51 +0200 |
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(+)
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
- [PATCH 0/4] modules: add support for target-specific modules., Gerd Hoffmann, 2021/06/10
- [PATCH 1/4] modules: factor out arch check, Gerd Hoffmann, 2021/06/10
- [PATCH 2/4] modules: check arch on qom lookup,
Gerd Hoffmann <=
- [PATCH 3/4] modules: target-specific module build infrastructure, Gerd Hoffmann, 2021/06/10
- [PATCH 4/4] modules: build virtio-9p modular, Gerd Hoffmann, 2021/06/10
- Re: [PATCH 0/4] modules: add support for target-specific modules., Claudio Fontana, 2021/06/10
- Re: [PATCH 0/4] modules: add support for target-specific modules., Gerd Hoffmann, 2021/06/10
- Re: [PATCH 0/4] modules: add support for target-specific modules., Gerd Hoffmann, 2021/06/10
- Re: [PATCH 0/4] modules: add support for target-specific modules., Claudio Fontana, 2021/06/10
- Re: [PATCH 0/4] modules: add support for target-specific modules., Paolo Bonzini, 2021/06/11
- Re: [PATCH 0/4] modules: add support for target-specific modules., Gerd Hoffmann, 2021/06/11
- Re: [PATCH 0/4] modules: add support for target-specific modules., Gerd Hoffmann, 2021/06/11
- Re: [PATCH 0/4] modules: add support for target-specific modules., Claudio Fontana, 2021/06/11