提交 fb614075 编写于 作者: M Martin Kletzander

qemu: Add support for virtio-vga/gpu's max_outputs= parameter

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1449712Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
上级 66c4e153
...@@ -4484,6 +4484,11 @@ qemuBuildDeviceVideoStr(const virDomainDef *def, ...@@ -4484,6 +4484,11 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
if (video->heads) if (video->heads)
virBufferAsprintf(&buf, ",max_outputs=%u", 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 && } else if (video->vram &&
((video->type == VIR_DOMAIN_VIDEO_TYPE_VGA && ((video->type == VIR_DOMAIN_VIDEO_TYPE_VGA &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_VGA_VGAMEM)) || virQEMUCapsGet(qemuCaps, QEMU_CAPS_VGA_VGAMEM)) ||
......
...@@ -22,5 +22,5 @@ server,nowait \ ...@@ -22,5 +22,5 @@ server,nowait \
-drive file=/var/lib/libvirt/images/QEMUGuest1,format=qcow2,if=none,\ -drive file=/var/lib/libvirt/images/QEMUGuest1,format=qcow2,if=none,\
id=drive-ide0-0-0,cache=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 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 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
...@@ -1883,7 +1883,8 @@ mymain(void) ...@@ -1883,7 +1883,8 @@ mymain(void)
DO_TEST("video-virtio-vga", DO_TEST("video-virtio-vga",
QEMU_CAPS_DEVICE_VIRTIO_GPU, QEMU_CAPS_DEVICE_VIRTIO_GPU,
QEMU_CAPS_DEVICE_VIRTIO_VGA, 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_PARSE_ERROR("video-invalid", NONE);
DO_TEST("virtio-rng-default", DO_TEST("virtio-rng-default",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册