From: Venu Busireddy <venu.busireddy@oracle.com>
To: venu.busireddy@oracle.com, "Michael S. Tsirkin" <mst@redhat.com>,
Marcel Apfelbaum <marcel@redhat.com>
Cc: Si-Wei Liu <si-wei.liu@oracle.com>,
virtio-dev@lists.oasis-open.org, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH v3 5/5] pci: query command extension to check the bus master enabling status of the failover-primary device
Date: Mon, 7 Jan 2019 17:29:44 -0500 [thread overview]
Message-ID: <1546900184-27403-6-git-send-email-venu.busireddy@oracle.com> (raw)
In-Reply-To: <1546900184-27403-1-git-send-email-venu.busireddy@oracle.com>
From: Si-Wei Liu <si-wei.liu@oracle.com>
Signed-off-by: Si-Wei Liu <si-wei.liu@oracle.com>
Signed-off-by: Venu Busireddy <venu.busireddy@oracle.com>
---
hmp.c | 5 +++++
hw/pci/pci.c | 5 +++++
qapi/misc.json | 5 ++++-
3 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/hmp.c b/hmp.c
index 7828f93..7a75c93 100644
--- a/hmp.c
+++ b/hmp.c
@@ -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) {
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 56b13b3..9da49fd 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -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;
}
diff --git a/qapi/misc.json b/qapi/misc.json
index 6c1c5c0..05f003e 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -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:
next prev parent reply other threads:[~2019-01-07 22:30 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 22:29 [Qemu-devel] [PATCH v3 0/5] Support for datapath switching during live migration Venu Busireddy
2019-01-07 22:29 ` [Qemu-devel] [PATCH v3 1/5] virtio_net: Add VIRTIO_NET_F_STANDBY feature bit Venu Busireddy
2019-01-08 16:56 ` Dongli Zhang
2019-01-08 17:25 ` Venu Busireddy
2019-01-09 0:14 ` Dongli Zhang
2019-01-09 0:18 ` Samudrala, Sridhar
2019-01-09 0:39 ` Dongli Zhang
2019-01-09 4:17 ` Michael S. Tsirkin
2019-01-07 22:29 ` [Qemu-devel] [PATCH v3 2/5] virtio_net: Add support for "Data Path Switching" during Live Migration Venu Busireddy
2019-01-09 13:39 ` [Qemu-devel] [virtio-dev] " Cornelia Huck
2019-01-09 15:56 ` [Qemu-devel] " Michael S. Tsirkin
2019-01-11 2:09 ` si-wei liu
2019-01-11 3:20 ` Michael S. Tsirkin
2019-01-11 7:09 ` [Qemu-devel] [virtio-dev] " si-wei liu
2019-01-14 11:10 ` Roman Kagan
2019-01-07 22:29 ` [Qemu-devel] [PATCH v3 3/5] virtio_net: Add a query command for FAILOVER_STANDBY_CHANGED event Venu Busireddy
2019-01-08 0:10 ` Michael S. Tsirkin
2019-01-07 22:29 ` [Qemu-devel] [PATCH v3 4/5] vfio-pci: Add FAILOVER_PRIMARY_CHANGED event to shorten downtime during failover Venu Busireddy
2019-01-07 23:17 ` Alex Williamson
2019-01-07 23:22 ` Michael S. Tsirkin
2019-01-07 23:41 ` Alex Williamson
2019-01-08 0:12 ` Michael S. Tsirkin
2019-01-08 0:24 ` Alex Williamson
2019-01-08 0:43 ` Michael S. Tsirkin
2019-01-08 1:13 ` si-wei liu
2019-01-07 22:29 ` Venu Busireddy [this message]
2019-01-07 23:32 ` [Qemu-devel] [PATCH v3 0/5] Support for datapath switching during live migration Michael S. Tsirkin
2019-01-08 1:45 ` [Qemu-devel] [virtio-dev] " si-wei liu
2019-01-08 2:25 ` Michael S. Tsirkin
2019-01-09 4:55 ` si-wei liu
2019-01-09 13:39 ` Michael S. Tsirkin
2019-01-11 6:57 ` si-wei liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1546900184-27403-6-git-send-email-venu.busireddy@oracle.com \
--to=venu.busireddy@oracle.com \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=si-wei.liu@oracle.com \
--cc=virtio-dev@lists.oasis-open.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).