mirror of https://gitee.com/openkylin/libvirt.git
qemu: Add support for virtio-vga/gpu's max_outputs= parameter
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1449712 Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
66c4e15335
commit
fb61407501
|
@ -4484,6 +4484,11 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
|
|||
if (video->heads)
|
||||
virBufferAsprintf(&buf, ",max_outputs=%u", video->heads);
|
||||
}
|
||||
} else if (video->type == VIR_DOMAIN_VIDEO_TYPE_VIRTIO) {
|
||||
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS)) {
|
||||
if (video->heads)
|
||||
virBufferAsprintf(&buf, ",max_outputs=%u", video->heads);
|
||||
}
|
||||
} else if (video->vram &&
|
||||
((video->type == VIR_DOMAIN_VIDEO_TYPE_VGA &&
|
||||
virQEMUCapsGet(qemuCaps, QEMU_CAPS_VGA_VGAMEM)) ||
|
||||
|
|
|
@ -22,5 +22,5 @@ server,nowait \
|
|||
-drive file=/var/lib/libvirt/images/QEMUGuest1,format=qcow2,if=none,\
|
||||
id=drive-ide0-0-0,cache=none \
|
||||
-device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
|
||||
-device virtio-vga,id=video0,bus=pci.0,addr=0x2 \
|
||||
-device virtio-vga,id=video0,max_outputs=1,bus=pci.0,addr=0x2 \
|
||||
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
|
||||
|
|
|
@ -1883,7 +1883,8 @@ mymain(void)
|
|||
DO_TEST("video-virtio-vga",
|
||||
QEMU_CAPS_DEVICE_VIRTIO_GPU,
|
||||
QEMU_CAPS_DEVICE_VIRTIO_VGA,
|
||||
QEMU_CAPS_DEVICE_VIDEO_PRIMARY);
|
||||
QEMU_CAPS_DEVICE_VIDEO_PRIMARY,
|
||||
QEMU_CAPS_VIRTIO_GPU_MAX_OUTPUTS);
|
||||
DO_TEST_PARSE_ERROR("video-invalid", NONE);
|
||||
|
||||
DO_TEST("virtio-rng-default",
|
||||
|
|
Loading…
Reference in New Issue