diff options
author | David Hildenbrand <david@redhat.com> | 2017-09-28 15:46:08 +0200 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2017-10-06 10:53:02 +0200 |
commit | 1e70ba24a906211c26930f4f41a674fcb685f8ef (patch) | |
tree | 6140d0c507a76fdc2897550fb4e7887cb5661bb4 /target/s390x/cpu_models.c | |
parent | c547a757f492cb037aec81965893046b7ef6d201 (diff) |
target/s390x: get rid of next_core_id
core_id is not needed by linux-user, as the core_id a.k.a. CPU address
is only accessible from kernel space.
Therefore, drop next_core_id and make cpu_index get autoassigned again
for linux-user.
While at it, shield core_id and cpuid completely from linux-user. cpuid
can also only be queried from kernel space.
Suggested-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170928134609.16985-5-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/cpu_models.c')
-rw-r--r-- | target/s390x/cpu_models.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index 48dd7beddd..07ef8a3b6e 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -945,11 +945,13 @@ void s390_realize_cpu_model(CPUState *cs, Error **errp) apply_cpu_model(cpu->model, errp); +#if !defined(CONFIG_USER_ONLY) cpu->env.cpuid = s390_cpuid_from_cpu_model(cpu->model); if (tcg_enabled()) { /* basic mode, write the cpu address into the first 4 bit of the ID */ cpu->env.cpuid = deposit64(cpu->env.cpuid, 54, 4, cpu->env.core_id); } +#endif } static void get_feature(Object *obj, Visitor *v, const char *name, |