Accepting request 919516 from home:jziviani:branches:Virtualization

- Fix testsuite dependencies
* Patches added:
  modules-quick-fix-a-fundamental-error-in.patch

OBS-URL: https://build.opensuse.org/request/show/919516
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=673
This commit is contained in:
José Ricardo Ziviani 2021-09-16 12:19:38 +00:00 committed by Git OBS Bridge
parent 00b6d2ec43
commit 7987d2bc69
4 changed files with 77 additions and 2 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:43c519c9991d32f0cb9babf8ac470a778ef80b428147c136264153915bd81130
size 44228
oid sha256:daf109e90b1e668fee14e71cc9d7f0e34416473336233161394915d1aef98172
size 44824

View File

@ -0,0 +1,66 @@
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
Signed-off-by: Jose R. Ziviani <jziviani@suse.de>
---
include/qemu/module.h | 1 +
util/module.c | 26 ++++++++++++++++++++++++++
2 files changed, 27 insertions(+)
diff --git a/include/qemu/module.h b/include/qemu/module.h
index 3deac0078b9d4d62d0549427b7ec..49d46532000e8c7211d43f7b705c 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..485c137c79e9d4e45c4708bb8017 100644
--- a/util/module.c
+++ b/util/module.c
@@ -119,6 +119,28 @@ 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]);
+
+ 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 +153,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 */

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Thu Sep 16 03:55:52 UTC 2021 - José Ricardo Ziviani <jose.ziviani@suse.com>
- Fix testsuite dependencies
* Patches added:
modules-quick-fix-a-fundamental-error-in.patch
-------------------------------------------------------------------
Tue Sep 14 17:19:23 UTC 2021 - José Ricardo Ziviani <jose.ziviani@suse.com>

View File

@ -187,6 +187,7 @@ Patch00051: virtio-balloon-don-t-start-free-page-hin.patch
Patch00052: qemu-sockets-fix-unix-socket-path-copy-a.patch
Patch00053: target-i386-add-missing-bits-to-CR4_RESE.patch
Patch00054: qemu-binfmt-conf.sh-should-use-F-as-shor.patch
Patch00055: modules-quick-fix-a-fundamental-error-in.patch
# Patches applied in roms/seabios/:
Patch01000: seabios-use-python2-explicitly-as-needed.patch
Patch01001: seabios-switch-to-python3-as-needed.patch
@ -1132,6 +1133,7 @@ This package records qemu testsuite results and represents successful testing.
%patch00052 -p1
%patch00053 -p1
%patch00054 -p1
%patch00055 -p1
%patch01000 -p1
%patch01001 -p1
%patch01002 -p1