--- /dev/null
+LC_ALL=C \
+PATH=/bin \
+HOME=/home/test \
+USER=test \
+LOGNAME=test \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-kvm \
+-name guest1 \
+-S \
+-M s390-ccw-virtio \
+-cpu zEC12 \
+-m 214 \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \
+-nographic \
+-nodefaults \
+-monitor unix:/tmp/lib/domain--1-guest1/monitor.sock,server,nowait \
+-no-acpi \
+-boot c
--- /dev/null
+<domain type='kvm'>
+ <name>guest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219100</memory>
+ <currentMemory unit='KiB'>219100</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <cpu mode='custom' match='exact'>
+ <model fallback='forbid'>zEC12</model>
+ </cpu>
+ <devices>
+ <emulator>/usr/bin/qemu-kvm</emulator>
+ <memballoon model='none'/>
+ </devices>
+</domain>
const char *ppc64Models[] = {
"POWER8", "POWER7",
};
+ const char *s390xModels[] = {
+ "z990", "zEC12", "z13",
+ };
if (ARCH_IS_X86(arch)) {
if (virQEMUCapsAddCPUDefinitions(caps, VIR_DOMAIN_VIRT_KVM, x86Models,
ARRAY_CARDINALITY(ppc64Models),
VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0)
return -1;
+ } else if (ARCH_IS_S390(arch)) {
+ if (virQEMUCapsAddCPUDefinitions(caps, VIR_DOMAIN_VIRT_KVM, s390xModels,
+ ARRAY_CARDINALITY(s390xModels),
+ VIR_DOMCAPS_CPU_USABLE_UNKNOWN) < 0)
+ return -1;
}
return 0;
DO_TEST_FAILURE("cpu-host-passthrough", NONE);
DO_TEST_FAILURE("cpu-qemu-host-passthrough", QEMU_CAPS_KVM);
+ qemuTestSetHostArch(driver.caps, VIR_ARCH_S390X);
+ DO_TEST("cpu-s390-zEC12", QEMU_CAPS_KVM, QEMU_CAPS_VIRTIO_CCW, QEMU_CAPS_VIRTIO_S390);
+ qemuTestSetHostArch(driver.caps, VIR_ARCH_NONE);
+
qemuTestSetHostCPU(driver.caps, cpuHaswell);
DO_TEST("cpu-Haswell", QEMU_CAPS_KVM);
DO_TEST("cpu-Haswell2", QEMU_CAPS_KVM);