[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
unrelated modules listed in modinfo files?
From: |
Michael Tokarev |
Subject: |
unrelated modules listed in modinfo files? |
Date: |
Thu, 17 Aug 2023 14:39:51 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 |
Hi!
Noticed relatively new modules, accel-tcg-i386.so and accel-tcg-x86_64.so
(built after commit dae0ec159f9205002696). At first I thought these are
x86-specific, but it turns out these are listed in *all* qemu-system-*
binaries. For example, during build, modinfo-s390x-softmmu.c contains:
},{
/* accel-tcg-i386.modinfo */
.name = "accel-tcg-i386",
.arch = "i386",
.objs = ((const char*[]){ ("tcg" "-" "accel" "-ops"), NULL }),
},{
/* accel-tcg-x86_64.modinfo */
.name = "accel-tcg-x86_64",
.arch = "x86_64",
.objs = ((const char*[]){ ("tcg" "-" "accel" "-ops"), NULL }),
},{
Also, all the qtest "accel" modules are in there too, eg
},{
/* accel-qtest-xtensa.modinfo */
.name = "accel-qtest-xtensa",
.arch = "xtensa",
.objs = ((const char*[]){ ("qtest" "-" "accel"), ("qtest" "-" "accel"
"-ops"), NULL }),
},{
Shouldn't these be arch-specific, and be included only in the binaries where it
makes sense? Like, for example, hw-s390x-virtio-gpu-ccw is a module specific
to s390x architecture, and it is not listed in other .modinfo files besides
s390x one, like this:
},{
/* hw-s390x-virtio-gpu-ccw.modinfo */
/* module VIRTIO_CCW isn't enabled in Kconfig. */
/* },{
Also, why do we have this check in module_load() to begin with:
if (!module_check_arch(modinfo)) {
error_setg(errp, "module arch does not match: "
"expected '%s', got '%s'", module_arch, modinfo->arch);
goto out;
}
?
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- unrelated modules listed in modinfo files?,
Michael Tokarev <=