qemu/hw/s390x
David Hildenbrand ca5c1457d6 target/s390x: use "core-id" for cpu number/address/id handling
Some time ago we discussed that using "id" as property name is not the
right thing to do, as it is a reserved property for other devices and
will not work with device_add.

Switch to the term "core-id" instead, and use it as an equivalent to
"CPU address" mentioned in the PoP. There is no such thing as cpu number,
so rename env.cpu_num to env.core_id. We use "core-id" as this is the
common term to use for device_add later on (x86 and ppc).

We can get rid of cpu->id now. Keep cpu_index and env->core_id in sync.
cpu_index was already implicitly used by e.g. cpu_exists(), so keeping
both in sync seems to be the right thing to do.

cpu_index will now no longer automatically get set via
cpu_exec_realizefn(). For now, we were lucky that both implicitly stayed
in sync.

Our new cpu property "core-id" can be a static property. Range checks can
be avoided by using the correct type and the "setting after realized"
check is done implicitly.

device_add will later need the reserved "id" property. Hotplugging a CPU
on s390x will then be: "device_add host-s390-cpu,id=cpu2,core-id=2".

Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20170913132417.24384-14-david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
2017-09-19 18:31:32 +02:00
..
3270-ccw.c s390x/3270: fix instruction interception handler 2017-07-05 12:16:55 +02:00
Makefile.objs s390x: get rid of s390-virtio.c 2017-09-19 18:31:31 +02:00
ccw-device.c s390x: vmstatify config migration for virtio-ccw 2017-07-05 12:16:55 +02:00
ccw-device.h s390x: vmstatify config migration for virtio-ccw 2017-07-05 12:16:55 +02:00
css-bridge.c s390x: add flags field for registering I/O adapter 2017-07-14 12:29:47 +02:00
css.c s390x/css: remove unused error handling branch 2017-09-19 18:21:33 +02:00
event-facility.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
ipl.c s390x/ipl: The s390-ipl device is not hot-pluggable 2017-08-30 18:23:25 +02:00
ipl.h hw/s390x/ipl: enable LOADPARM in IPIB for a boot device 2017-05-02 15:08:54 +02:00
s390-ccw.c s390x/css: ccw translation infrastructure 2017-05-19 12:29:01 +02:00
s390-pci-bus.c s390x/pci: add iommu replay callback 2017-09-19 18:21:33 +02:00
s390-pci-bus.h s390x/pci: remove idx from msix msg data 2017-09-19 18:21:32 +02:00
s390-pci-inst.c s390x/pci: remove idx from msix msg data 2017-09-19 18:21:32 +02:00
s390-pci-inst.h s390x/pci: make S390PCIIOMMU inherit Object 2017-01-20 09:48:09 +01:00
s390-pci-stub.c s390x/pci: remove idx from msix msg data 2017-09-19 18:21:32 +02:00
s390-skeys-kvm.c s390x/s390-skeys: Mark the storage key devices with user_creatable = false 2017-08-30 18:23:25 +02:00
s390-skeys.c s390x/s390-skeys: Mark the storage key devices with user_creatable = false 2017-08-30 18:23:25 +02:00
s390-stattrib-kvm.c s390x/s390-stattrib: Mark the storage attribute as not user_creatable 2017-08-30 18:23:26 +02:00
s390-stattrib.c s390x/s390-stattrib: Mark the storage attribute as not user_creatable 2017-08-30 18:23:26 +02:00
s390-virtio-ccw.c target/s390x: use "core-id" for cpu number/address/id handling 2017-09-19 18:31:32 +02:00
s390-virtio-hcall.c s390x: rename s390-virtio.h to s390-virtio-hcall.h 2017-09-19 18:31:31 +02:00
s390-virtio-hcall.h s390x: move s390_virtio_hypercall() to s390-virtio-hcall.h 2017-09-19 18:31:31 +02:00
sclp.c s390x: drop inclusion of sysemu/kvm.h from some files 2017-08-30 18:23:25 +02:00
sclpcpu.c s390x: drop inclusion of sysemu/kvm.h from some files 2017-08-30 18:23:25 +02:00
sclpquiesce.c Use #include "..." for our own headers, <...> for others 2016-07-12 16:19:16 +02:00
trace-events trace-events: fix code style: print 0x before hex numbers 2017-08-01 12:13:07 +01:00
virtio-ccw.c s390x/kvm/migration/cpumodel: fixes, enhancements and cleanups 2017-07-14 14:19:35 +01:00
virtio-ccw.h virtio-ccw: add virtio-crypto-ccw device 2017-02-24 10:15:18 +01:00