Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:SRIZkP4w2m
qemu
modules-quick-fix-a-fundamental-error-in.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File modules-quick-fix-a-fundamental-error-in.patch of Package qemu
From: "Jose R. Ziviani" <jziviani@suse.de> Date: Thu, 16 Sep 2021 00:52:34 -0300 Subject: modules: quick-fix a fundamental error in modules Git-commit: 00000000000000000000000000000000000000000 References: bsc#1190573 modinfo.c is generated regarding the arch being built. However, if we build multiple arch targets at once, modinfo.c will list modules that might not be supported by all these targets. When trying to run these targets, errors[1] will appear. This patch is a bandaid specific to s390x. It will be removed as soon as a better approach is fixed upstream. [1] $ qemu-system-s390x -nodefaults -display none -accel qtest -M none -device help Failed to open module: /home/jose/qemu/build/hw-display-virtio-vga.so: undefined symbol: vmstate_vga_common Signed-off-by: Jose R. Ziviani <jziviani@suse.de> --- include/qemu/module.h | 1 + util/module.c | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/include/qemu/module.h b/include/qemu/module.h index 5fcc323b2a79d5adfdf27fa19bf7..ed051a6c0e7df56015e25936e641 100644 --- a/include/qemu/module.h +++ b/include/qemu/module.h @@ -73,6 +73,7 @@ bool module_load_one(const char *prefix, const char *lib_name, bool mayfail); void module_load_qom_one(const char *type); void module_load_qom_all(void); void module_allow_arch(const char *arch); +bool s390x_blocklist(const char *name); /** * DOC: module info annotation macros diff --git a/util/module.c b/util/module.c index 6bb4ad915a1c86f1601a4913a29c..8370d4c6209eda4319342b202f6b 100644 --- a/util/module.c +++ b/util/module.c @@ -119,6 +119,35 @@ static const QemuModinfo module_info_stub[] = { { static const QemuModinfo *module_info = module_info_stub; static const char *module_arch; +bool s390x_blocklist(const char *name) +{ + const char *blocklist[] = { + "hw-display-qxl", + "hw-display-virtio-vga", + "hw-display-virtio-vga-gl", + "hw-usb-host", + "hw-usb-redirect", + "hw-usb-smartcard" + }; + + const size_t len = sizeof(blocklist) / sizeof(blocklist[0]); + + if (strcmp(module_arch, "x86_64") == 0 || + strcmp(module_arch, "i386") == 0 || + strcmp(module_arch, "arm") == 0 || + strcmp(module_arch, "aarch64") == 0) { + return false; + } + + for (size_t i = 0; i < len; i++) { + if (strcmp(blocklist[i], name) == 0) { + return true; + } + } + + return false; +} + void module_init_info(const QemuModinfo *info) { module_info = info; @@ -131,6 +160,10 @@ void module_allow_arch(const char *arch) static bool module_check_arch(const QemuModinfo *modinfo) { + if (modinfo->name && s390x_blocklist(modinfo->name)) { + return false; + } + if (modinfo->arch) { if (!module_arch) { /* no arch set -> ignore all */
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor