提交 dee2218b 编写于 作者: J Jonathon Jongsma 提交者: Michal Privoznik

qemu: explicitly disable virgl when requested

If a domain is configured to have an egl-headless display and a virtio
video device, virgl will be enabled automatically within the guest, even
if the video device is configured with accel3d='no'.

In this case we should explicitly pass 'virgl=off' to qemu.

See https://bugzilla.redhat.com/show_bug.cgi?id=1791236 for more
information.
Signed-off-by: NJonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
上级 51489b84
......@@ -4429,7 +4429,10 @@ qemuBuildDeviceVideoStr(const virDomainDef *def,
if (video->backend != VIR_DOMAIN_VIDEO_BACKEND_TYPE_VHOSTUSER &&
video->type == VIR_DOMAIN_VIDEO_TYPE_VIRTIO) {
if (video->accel && video->accel->accel3d == VIR_TRISTATE_SWITCH_ON) {
if (video->accel &&
virQEMUCapsGet(qemuCaps, QEMU_CAPS_VIRTIO_GPU_VIRGL) &&
(video->accel->accel3d == VIR_TRISTATE_SWITCH_ON ||
video->accel->accel3d == VIR_TRISTATE_SWITCH_OFF)) {
virBufferAsprintf(&buf, ",virgl=%s",
virTristateSwitchTypeToString(video->accel->accel3d));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册