36 lines
1.2 KiB
Diff
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,
|