SHA256
1
0
forked from pool/qemu
qemu/0055-linux-user-exclude-cpu-model-code-w.patch
Bruce Rogers 4aa328d7c1 Accepting request 461715 from Virtualization:Staging
Update to v2.8.0, including integration of SLE qemu package so we are "Factory First" again for SLE qemu. Includes some spec file tweaks/cleanups as well. A number of post v2.8.0 security fixes are also included.

OBS-URL: https://build.opensuse.org/request/show/461715
OBS-URL: https://build.opensuse.org/package/show/Virtualization/qemu?expand=0&rev=329
2017-03-15 19:38:55 +00:00

36 lines
1.2 KiB
Diff

From a31edb2865923f478830a2f05e64259ae9841f3c Mon Sep 17 00:00:00 2001
From: Bruce Rogers <brogers@suse.com>
Date: Tue, 14 Feb 2017 10:37:59 -0700
Subject: [PATCH] linux-user: exclude cpu model code when building linux-user
A section of s390_realize_cpu_model() needed to be guarded by
CONFIG_USER_ONLY. This omission was causing a segfault when
testing the executable being built for the s390x qemu-linux-user
package.
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
target-s390x/cpu_models.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target-s390x/cpu_models.c b/target-s390x/cpu_models.c
index c1e729df5e..f2eadd2cfb 100644
--- a/target-s390x/cpu_models.c
+++ b/target-s390x/cpu_models.c
@@ -738,6 +738,7 @@ void s390_realize_cpu_model(CPUState *cs, Error **errp)
return;
}
+#ifndef CONFIG_USER_ONLY
/* copy over properties that can vary */
cpu->model->lowest_ibc = max_model->lowest_ibc;
cpu->model->cpu_id = max_model->cpu_id;
@@ -750,6 +751,7 @@ void s390_realize_cpu_model(CPUState *cs, Error **errp)
}
apply_cpu_model(cpu->model, errp);
+#endif
}
static void get_feature(Object *obj, Visitor *v, const char *name,