[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 19/34] modules: check arch on qom lookup
From: |
Gerd Hoffmann |
Subject: |
[PATCH v4 19/34] modules: check arch on qom lookup |
Date: |
Thu, 24 Jun 2021 12:38:21 +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 065aed09ffef..6bb4ad915a1c 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;
--
2.31.1
- [PATCH v4 08/34] modules: add audio module annotations, (continued)
- [PATCH v4 08/34] modules: add audio module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 10/34] modules: add ccid module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 11/34] modules: add ui module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 12/34] modules: add s390x module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 13/34] modules: add block module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 14/34] modules: use modinfo for dependencies, Gerd Hoffmann, 2021/06/24
- [PATCH v4 15/34] modules: use modinfo for qom load, Gerd Hoffmann, 2021/06/24
- [PATCH v4 17/34] modules: add tracepoints, Gerd Hoffmann, 2021/06/24
- [PATCH v4 16/34] modules: use modinfo for qemu opts load, Gerd Hoffmann, 2021/06/24
- [PATCH v4 18/34] modules: check arch and block load on mismatch, Gerd Hoffmann, 2021/06/24
- [PATCH v4 19/34] modules: check arch on qom lookup,
Gerd Hoffmann <=
- [PATCH v4 20/34] modules: target-specific module build infrastructure, Gerd Hoffmann, 2021/06/24
- [PATCH v4 21/34] modules: add documentation for module sourcesets, Gerd Hoffmann, 2021/06/24
- [PATCH v4 23/34] modules: module.h kerneldoc annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 22/34] modules: add module_obj() note to QOM docs, Gerd Hoffmann, 2021/06/24
- [PATCH v4 24/34] modules: hook up modules.h to docs build, Gerd Hoffmann, 2021/06/24
- [PATCH v4 25/34] accel: autoload modules, Gerd Hoffmann, 2021/06/24
- [PATCH v4 27/34] accel: build qtest modular, Gerd Hoffmann, 2021/06/24
- [PATCH v4 26/34] accel: add qtest module annotations, Gerd Hoffmann, 2021/06/24
- [PATCH v4 29/34] accel: build tcg modular, Gerd Hoffmann, 2021/06/24
- [PATCH v4 28/34] accel: add tcg module annotations, Gerd Hoffmann, 2021/06/24