Add the ability to enable/disable exposing the EDID information to the guest.
The edid attribute can specified in the domain XML as below:
<video>
<model type='virtio' edid='off'/>
</video>
If the edid attribute is unspecified, it is not generated so that the
virtualisation platform will continue to use its default.
The edid attribute is only valid for the vga, boch and virtio display models
and is currently only implemented for the QEMU driver.
Signed-off-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
sub-element is valid for model types "vga", "qxl", "bochs", "gop",
and "virtio".
+ :since:`Since 11.7.0` (QEMU driver only), the ``model`` element may have an
+ optional ``edid`` attribute that can be set to ``on`` or ``off``. If the
+ ``edid`` attribute is not specified then the device will use its default value.
+ Otherwise setting ``edid`` to ``on`` will expose the device EDID blob to the
+ guest, whilst setting it to ``off`` will hide the device EDID blob from the
+ guest. The ``edid`` attribute is only valid for model types ``vga``, ``bochs``,
+ and ``virtio``.
+
``acceleration``
Configure if video acceleration should be enabled.
if (virXMLPropTristateSwitch(node, "blob", VIR_XML_PROP_NONE, &def->blob) < 0)
return -1;
+ if (virXMLPropTristateSwitch(node, "edid", VIR_XML_PROP_NONE, &def->edid) < 0)
+ return -1;
+
return 0;
}
}
}
+ if (src->edid != dst->edid) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("Target video card edid %1$s does not match source %2$s"),
+ virTristateSwitchTypeToString(dst->type),
+ virTristateSwitchTypeToString(src->type));
+ return false;
+ }
+
if (!virDomainVirtioOptionsCheckABIStability(src->virtio, dst->virtio))
return false;
virBufferAddLit(buf, " primary='yes'");
if (def->blob != VIR_TRISTATE_SWITCH_ABSENT)
virBufferAsprintf(buf, " blob='%s'", virTristateSwitchTypeToString(def->blob));
+ if (def->edid != VIR_TRISTATE_SWITCH_ABSENT)
+ virBufferAsprintf(buf, " edid='%s'", virTristateSwitchTypeToString(def->edid));
if (def->accel || def->res) {
virBufferAddLit(buf, ">\n");
virBufferAdjustIndent(buf, 2);
virDomainDeviceInfo info;
virDomainVirtioOptions *virtio;
virDomainVideoBackendType backend;
+ virTristateSwitch edid;
};
/* graphics console modes */
}
}
+ if ((video->type != VIR_DOMAIN_VIDEO_TYPE_BOCHS) &&
+ (video->type != VIR_DOMAIN_VIDEO_TYPE_VGA) &&
+ (video->type != VIR_DOMAIN_VIDEO_TYPE_VIRTIO)) {
+ if (video->edid != VIR_TRISTATE_SWITCH_ABSENT) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("video type '%1$s' does not support edid"),
+ virDomainVideoTypeToString(video->type));
+ return -1;
+ }
+ }
+
return 0;
}
<ref name="virOnOff"/>
</attribute>
</optional>
+ <optional>
+ <attribute name="edid">
+ <ref name="virOnOff"/>
+ </attribute>
+ </optional>
<optional>
<element name="acceleration">
<optional>
return -1;
}
+ if (virJSONValueObjectAdd(&props, "T:edid", video->edid, NULL) < 0)
+ return -1;
+
if (video->res) {
if (virJSONValueObjectAdd(&props,
"p:xres", video->res->x,