@@ -890,6 +890,11 @@ static void hmp_info_pci_device(Monitor *mon, const PciDeviceInfo *dev)
}
}
+ if (dev->has_failover_status) {
+ monitor_printf(mon, " Failover primary, bus master %s.\n",
+ dev->failover_status ? "enabled" : "disabled");
+ }
+
monitor_printf(mon, " id \"%s\"\n", dev->qdev_id);
if (dev->has_pci_bridge) {
@@ -1761,6 +1761,11 @@ static PciDeviceInfo *qmp_query_pci_device(PCIDevice *dev, PCIBus *bus,
pci_get_word(dev->config + PCI_CB_SUBSYSTEM_VENDOR_ID);
}
+ if (dev->failover_primary) {
+ info->has_failover_status = true;
+ info->failover_status = dev->bus_master_enable_region.enabled;
+ }
+
return info;
}
@@ -865,6 +865,9 @@
#
# @regions: a list of the PCI I/O regions associated with the device
#
+# @failover_status: if 'failover-primary' property is 'true', true if PCI
+# bus master bit on the device is enabled
+#
# Notes: the contents of @class_info.desc are not stable and should only be
# treated as informational.
#
@@ -874,7 +877,7 @@
'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
'class_info': 'PciDeviceClass', 'id': 'PciDeviceId',
'*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
- 'regions': ['PciMemoryRegion']} }
+ 'regions': ['PciMemoryRegion'], '*failover_status': 'bool'} }
##
# @PciInfo: