s390x/cpumodel: "host" and "qemu" as CPU subclasses
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>
Mon, 5 Sep 2016 08:52:16 +0000 (10:52 +0200)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Tue, 6 Sep 2016 15:06:49 +0000 (17:06 +0200)
commit41868f846d2ca5865c1706dc6529964bfa3dac6c
treee22c316df6524e8636da6202829adcafdacd62b4
parentfc4b84b1c68a0dc2905d379f0f6a5305e4ebe0b3
s390x/cpumodel: "host" and "qemu" as CPU subclasses

This patch introduces two CPU models, "host" and "qemu".
"qemu" is used as default when running under TCG. "host" is used
as default when running under KVM. "host" cannot be used without KVM.
"host" is not migration-safe. They both inherit from the base s390x CPU,
which is turned into an abstract class.

This patch also changes CPU creation to take care of the passed CPU string
and reuses common code parse_features() function for that purpose. Unknown
CPU definitions are now reported. The "-cpu ?" and "query-cpu-definition"
commands are changed to list all CPU subclasses automatically, including
migration-safety and whether static.

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Message-Id: <20160905085244.99980-3-dahi@linux.vnet.ibm.com>
[CH: fix up self-assignments in s390_cpu_list, as spotted by clang]
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
hw/s390x/s390-virtio.c
target-s390x/Makefile.objs
target-s390x/cpu-qom.h
target-s390x/cpu.c
target-s390x/cpu.h
target-s390x/cpu_models.c [new file with mode: 0644]
target-s390x/helper.c