mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-08 12:41:29 +00:00
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 <alifm@linux.vnet.ibm.com>
This commit is contained in:
parent
4bbf7f8cb5
commit
2a0c3490dd
@ -5425,7 +5425,7 @@ qemuDomainDeviceDefPostParse(virDomainDeviceDefPtr dev,
|
|||||||
if (dev->data.video->type == VIR_DOMAIN_VIDEO_TYPE_DEFAULT) {
|
if (dev->data.video->type == VIR_DOMAIN_VIDEO_TYPE_DEFAULT) {
|
||||||
if (ARCH_IS_PPC64(def->os.arch))
|
if (ARCH_IS_PPC64(def->os.arch))
|
||||||
dev->data.video->type = VIR_DOMAIN_VIDEO_TYPE_VGA;
|
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;
|
dev->data.video->type = VIR_DOMAIN_VIDEO_TYPE_VIRTIO;
|
||||||
else
|
else
|
||||||
dev->data.video->type = VIR_DOMAIN_VIDEO_TYPE_CIRRUS;
|
dev->data.video->type = VIR_DOMAIN_VIDEO_TYPE_CIRRUS;
|
||||||
|
18
tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml
Normal file
18
tests/qemuxml2argvdata/video-virtio-gpu-ccw-auto.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<domain type='qemu'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1803</uuid>
|
||||||
|
<memory>219136</memory>
|
||||||
|
<vcpu>1</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
|
||||||
|
</os>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-system-s390x</emulator>
|
||||||
|
<disk type='block' device='disk'>
|
||||||
|
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||||
|
<target dev='hda' bus='virtio'/>
|
||||||
|
</disk>
|
||||||
|
<graphics type='vnc'/>
|
||||||
|
<panic model='s390'/>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
35
tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml
Normal file
35
tests/qemuxml2xmloutdata/video-virtio-gpu-ccw-auto.xml
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
<domain type='qemu'>
|
||||||
|
<name>QEMUGuest1</name>
|
||||||
|
<uuid>c7a5fdbd-edaf-9455-926a-d65c16db1803</uuid>
|
||||||
|
<memory unit='KiB'>219136</memory>
|
||||||
|
<currentMemory unit='KiB'>219136</currentMemory>
|
||||||
|
<vcpu placement='static'>1</vcpu>
|
||||||
|
<os>
|
||||||
|
<type arch='s390x' machine='s390-ccw-virtio'>hvm</type>
|
||||||
|
<boot dev='hd'/>
|
||||||
|
</os>
|
||||||
|
<clock offset='utc'/>
|
||||||
|
<on_poweroff>destroy</on_poweroff>
|
||||||
|
<on_reboot>restart</on_reboot>
|
||||||
|
<on_crash>destroy</on_crash>
|
||||||
|
<devices>
|
||||||
|
<emulator>/usr/bin/qemu-system-s390x</emulator>
|
||||||
|
<disk type='block' device='disk'>
|
||||||
|
<driver name='qemu' type='raw'/>
|
||||||
|
<source dev='/dev/HostVG/QEMUGuest1'/>
|
||||||
|
<target dev='hda' bus='virtio'/>
|
||||||
|
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0000'/>
|
||||||
|
</disk>
|
||||||
|
<graphics type='vnc' port='-1' autoport='yes'>
|
||||||
|
<listen type='address'/>
|
||||||
|
</graphics>
|
||||||
|
<video>
|
||||||
|
<model type='virtio' heads='1' primary='yes'/>
|
||||||
|
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0001'/>
|
||||||
|
</video>
|
||||||
|
<memballoon model='virtio'>
|
||||||
|
<address type='ccw' cssid='0xfe' ssid='0x0' devno='0x0002'/>
|
||||||
|
</memballoon>
|
||||||
|
<panic model='s390'/>
|
||||||
|
</devices>
|
||||||
|
</domain>
|
@ -1187,6 +1187,13 @@ mymain(void)
|
|||||||
QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS,
|
QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS,
|
||||||
QEMU_CAPS_VNC,
|
QEMU_CAPS_VNC,
|
||||||
QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW);
|
QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW);
|
||||||
|
DO_TEST("video-virtio-gpu-ccw-auto",
|
||||||
|
QEMU_CAPS_VIRTIO_CCW,
|
||||||
|
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
||||||
|
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
||||||
|
QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS,
|
||||||
|
QEMU_CAPS_VNC,
|
||||||
|
QEMU_CAPS_DEVICE_VIRTIO_GPU_CCW);
|
||||||
|
|
||||||
DO_TEST("intel-iommu",
|
DO_TEST("intel-iommu",
|
||||||
QEMU_CAPS_DEVICE_INTEL_IOMMU);
|
QEMU_CAPS_DEVICE_INTEL_IOMMU);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user