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;
                }


?

Reply via email to