On 10/7/21 11:12 PM, Laine Stump wrote:
@@ -27932,6 +27995,30 @@ virDomainDefFormatFeatures(virBuffer *buf,
virDomainIBSTypeToString(def->features[i]));
break;
+ case VIR_DOMAIN_FEATURE_PCI:
+ if (def->features[i] != VIR_TRISTATE_SWITCH_ON)
+ break;
+
+ virBufferAddLit(&childBuf, "<pci>\n");
+ virBufferAdjustIndent(&childBuf, 2);
+ for (j = 0; j < VIR_DOMAIN_PCI_LAST; j++) {
+ switch ((virDomainPCI) j) {
+ case VIR_DOMAIN_PCI_ACPI_BRIDGE_HP:
+ if (def->pci_features[j])
Oops, I missed this the first time I went through - this should compare
to VIR_TRISTATE_SWITCH_ABSENT rather than just checking for non-0. It
ends up being the same thing, but you never know - some day someone may
decide to change the values of the VIR_TRISTATE_* enums just for fun...
+ virBufferAsprintf(&childBuf,
"<%s state='%s'/>\n",
+ virDomainPCITypeToString(j),
+ virTristateSwitchTypeToString(
+ def->pci_features[j]));
+ break;