summaryrefslogtreecommitdiff
path: root/target/s390x/helper.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-09-19 18:08:48 +0100
committerPeter Maydell <peter.maydell@linaro.org>2017-09-19 18:08:48 +0100
commitc51700273ad9802a21c19f8d2b4bcb67c38e74ac (patch)
tree2ce01f3c430947dd0d8c467900bdc557422c2b8d /target/s390x/helper.c
parent7ec6a364916c0d1eba01128481e503a550a2b466 (diff)
parent9d1c4449218d8a2e98a6a11688b09b9137f25c1c (diff)
downloadqemu-c51700273ad9802a21c19f8d2b4bcb67c38e74ac.tar.gz
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20170919-v2' into staging
Assorted s390x patches: - introduce virtio-gpu-ccw, with virtio-gpu endian fixes - lots of cleanup in the s390x code - make device_add work for s390x cpus - enable seccomp on s390x - an ivshmem endian fix - set the reserved DHCP client architecture id for netboot - fixes in the css and pci support # gpg: Signature made Tue 19 Sep 2017 17:39:45 BST # gpg: using RSA key 0xDECF6B93C6F02FAF # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" # gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" # gpg: aka "Cornelia Huck <cohuck@kernel.org>" # gpg: aka "Cornelia Huck <cohuck@redhat.com>" # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20170919-v2: (38 commits) MAINTAINERS/s390x: add terminal3270.c virtio-ccw: Create a virtio gpu device for the ccw bus virtio-gpu: Handle endian conversion s390x/ccw: create s390 phb for compat reasons as well configure: Allow --enable-seccomp on s390x, too virtio-ccw: remove stale comments on endianness s390x: allow CPU hotplug in random core-id order s390x: generate sclp cpu information from possible_cpus s390x: get rid of cpu_s390x_create() s390x: get rid of cpu_states and use possible_cpus instead s390x: implement query-hotpluggable-cpus s390x: CPU hot unplug via device_del cannot work for now s390x: allow cpu hotplug via device_add s390x: print CPU definitions in sorted order target/s390x: rename next_cpu_id to next_core_id target/s390x: use "core-id" for cpu number/address/id handling target/s390x: set cpu->id for linux user when realizing s390x: allow only 1 CPU with TCG target/s390x: use program_interrupt() in per_check_exception() target/s390x: use trigger_pgm_exception() in s390_cpu_handle_mmu_fault() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'target/s390x/helper.c')
-rw-r--r--target/s390x/helper.c47
1 files changed, 3 insertions, 44 deletions
diff --git a/target/s390x/helper.c b/target/s390x/helper.c
index ba29504476..97adbcc86d 100644
--- a/target/s390x/helper.c
+++ b/target/s390x/helper.c
@@ -68,53 +68,12 @@ void s390x_cpu_timer(void *opaque)
}
#endif
-S390CPU *cpu_s390x_create(const char *cpu_model, Error **errp)
+S390CPU *s390x_new_cpu(const char *typename, uint32_t core_id, Error **errp)
{
- static bool features_parsed;
- char *name, *features;
- const char *typename;
- ObjectClass *oc;
- CPUClass *cc;
-
- name = g_strdup(cpu_model);
- features = strchr(name, ',');
- if (features) {
- features[0] = 0;
- features++;
- }
-
- oc = cpu_class_by_name(TYPE_S390_CPU, name);
- if (!oc) {
- error_setg(errp, "Unknown CPU definition \'%s\'", name);
- g_free(name);
- return NULL;
- }
- typename = object_class_get_name(oc);
-
- if (!features_parsed) {
- features_parsed = true;
- cc = CPU_CLASS(oc);
- cc->parse_features(typename, features, errp);
- }
- g_free(name);
-
- if (*errp) {
- return NULL;
- }
- return S390_CPU(CPU(object_new(typename)));
-}
-
-S390CPU *s390x_new_cpu(const char *cpu_model, int64_t id, Error **errp)
-{
- S390CPU *cpu;
+ S390CPU *cpu = S390_CPU(object_new(typename));
Error *err = NULL;
- cpu = cpu_s390x_create(cpu_model, &err);
- if (err != NULL) {
- goto out;
- }
-
- object_property_set_int(OBJECT(cpu), id, "id", &err);
+ object_property_set_int(OBJECT(cpu), core_id, "core-id", &err);
if (err != NULL) {
goto out;
}