From 2a0c3490dd612e9beddc34ec1b38a622b3fc27eb Mon Sep 17 00:00:00 2001 From: Farhan Ali Date: Fri, 23 Mar 2018 13:22:40 -0400 Subject: [PATCH] qemu: Change default video model type to virtio for S390 S390 guests can only support a virtio-gpu-ccw device as a video device. So set default video model type to VIR_DOMAIN_VIDEO_TYPE_VIRTIO for S390 guests. Signed-off-by: Farhan Ali --- src/qemu/qemu_domain.c | 2 +- .../video-virtio-gpu-ccw-auto.xml | 18 ++++++++++ .../video-virtio-gpu-ccw-auto.xml | 35 +++++++++++++++++++ tests/qemuxml2xmltest.c | 7 ++++ 4 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml create mode 100644 tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 7022f7c3da..4aaf617dae 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -5425,7 +5425,7 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev, if (dev->data.video->type == VIR_DOMAIN_VIDEO_TYPE_DEFAULT) { if (ARCH_IS_PPC64(def->os.arch)) dev->data.video->type = VIR_DOMAIN_VIDEO_TYPE_VGA; - else if (qemuDomainIsVirt(def)) + else if (qemuDomainIsVirt(def) || ARCH_IS_S390(def->os.arch)) dev->data.video->type = VIR_DOMAIN_VIDEO_TYPE_VIRTIO; else dev->data.video->type = VIR_DOMAIN_VIDEO_TYPE_CIRRUS; diff --git a/tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml b/tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml new file mode 100644 index 0000000000..2d5da387d8 --- /dev/null +++ b/tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml @@ -0,0 +1,18 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1803 + 219136 + 1 + + hvm + + + /usr/bin/qemu-system-s390x + + + + + + + + diff --git a/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml b/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml new file mode 100644 index 0000000000..b373275a1c --- /dev/null +++ b/tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml @@ -0,0 +1,35 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1803 + 219136 + 219136 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-s390x + + + + +
+ + + + +