|
| From: | Paolo Bonzini |
| Subject: | Re: [PATCH 1/2] meson: introduce modules_arch |
| Date: | Mon, 20 Sep 2021 21:03:28 +0200 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 20/09/21 15:02, Jose R. Ziviani wrote:
But, in anyway, I'll still need to store the target architecture that can use such core module, like I did here in this patch. Otherwise, if I compile different targets at the same time, I'll end up with the same problem of targets trying to load wrong modules. I thought of using qom, but I think it will pollute module.c.
Alternatively, you could C-ify the contents of config-devices.mak, and embed them in the per-arch modinfo-*.c; and record CONFIG_* symbols for each module (e.g. '{ "CONFIG_QXL", "hw-display-qxl" }' from a 'module_config("CONFIG_QXL")' line in the global modinfo.c file. Then before loading a module you do a binary search on the per-arch config-devices array.
I hope the above is readable. :) Paolo
| [Prev in Thread] | Current Thread | [Next in Thread] |