On Thu, 2019-01-17 at 12:52 -0500, Cole Robinson wrote:
[...]
+typedef enum {
+ VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_DEFAULT = -1,
+ VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO,
+ VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_TRANSITIONAL,
+ VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_NON_TRANSITIONAL,
+
+ VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_LAST
+} virDomainControllerModelVirtioSerial;
Do we even need MODEL_VIRTIO_SERIAL_DEFAULT here? Honest question :)
[...]
@@ -670,6 +670,8 @@
qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev,
break;
case VIR_DOMAIN_CONTROLLER_TYPE_VIRTIO_SERIAL:
+ if (cont->model ==
VIR_DOMAIN_CONTROLLER_MODEL_VIRTIO_SERIAL_VIRTIO_TRANSITIONAL)
+ return pciFlags;
return virtioFlags;
I'd prefer to see the kind of switch statement you added for
VIR_DOMAIN_DEVICE_VSOCK here as well.
--
Andrea Bolognani / Red Hat / Virtualization