[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v10 16/19] vfio: do hot bus reset when do virtual seco
From: |
Chen Fan |
Subject: |
[Qemu-devel] [RFC v10 16/19] vfio: do hot bus reset when do virtual secondary bus reset |
Date: |
Tue, 16 Jun 2015 16:11:00 +0800 |
when do virtual secondary bus reset, the vfio device under
this bus need to do host bus reset to reset the device.
so add this case.
Signed-off-by: Chen Fan <address@hidden>
---
hw/vfio/pci.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c
index a86edab..5bdfa73 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -4246,6 +4246,15 @@ static void vfio_pci_reset(DeviceState *dev)
trace_vfio_pci_reset(vdev->vbasedev.name);
+ if (vdev->needs_bus_reset) {
+ vdev->needs_bus_reset = false;
+ /* Avoid duplicate bus reset */
+ if (vdev->vbasedev.needs_reset) {
+ vfio_pci_hot_reset(vdev, false);
+ }
+ return;
+ }
+
vfio_pci_pre_reset(vdev);
if (vdev->resetfn && !vdev->resetfn(vdev)) {
--
1.9.3
- [Qemu-devel] [RFC v10 06/19] aer: impove pcie_aer_init to support vfio device, (continued)
- [Qemu-devel] [RFC v10 06/19] aer: impove pcie_aer_init to support vfio device, Chen Fan, 2015/06/16
- [Qemu-devel] [RFC v10 08/19] vfio: add ref for group to support own affected groups, Chen Fan, 2015/06/16
- [Qemu-devel] [RFC v10 05/19] vfio: add pcie extanded capability support, Chen Fan, 2015/06/16
- [Qemu-devel] [RFC v10 10/19] vfio: improve vfio_get_group to support adding as is NULL., Chen Fan, 2015/06/16
- [Qemu-devel] [RFC v10 07/19] vfio: add aer support for vfio device, Chen Fan, 2015/06/16
- [Qemu-devel] [RFC v10 09/19] vfio: extract vfio_register_container_listener from vfio_connect_container, Chen Fan, 2015/06/16
- [Qemu-devel] [RFC v10 11/19] get all affected groups for each device support aer, Chen Fan, 2015/06/16
- [Qemu-devel] [RFC v10 12/19] vfio: add check host bus reset is support or not, Chen Fan, 2015/06/16
- [Qemu-devel] [RFC v10 14/19] vfio: add sec_bus_reset notifier to notify physical bus reset is needed, Chen Fan, 2015/06/16
- [Qemu-devel] [RFC v10 15/19] vfio: improve vfio_pci_hot_reset to support more case, Chen Fan, 2015/06/16
- [Qemu-devel] [RFC v10 16/19] vfio: do hot bus reset when do virtual secondary bus reset,
Chen Fan <=
- [Qemu-devel] [RFC v10 17/19] pcie_aer: expose pcie_aer_msg() interface, Chen Fan, 2015/06/16
- [Qemu-devel] [RFC v10 18/19] vfio-pci: pass the aer error to guest, Chen Fan, 2015/06/16
- [Qemu-devel] [RFC v10 13/19] pci: add bus reset_notifiers callbacks for host bus reset, Chen Fan, 2015/06/16
[Qemu-devel] [RFC v10 19/19] vfio: add 'aer' property to expose aercap, Chen Fan, 2015/06/16