[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC v9 15/18] vfio: do hot bus reset when do virtual secon
From: |
Chen Fan |
Subject: |
[Qemu-devel] [RFC v9 15/18] vfio: do hot bus reset when do virtual secondary bus reset |
Date: |
Tue, 9 Jun 2015 11:37:43 +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 6507f39..655ac59 100644
--- a/hw/vfio/pci.c
+++ b/hw/vfio/pci.c
@@ -4239,6 +4239,15 @@ static void vfio_pci_reset(DeviceState *dev)
vfio_pci_pre_reset(vdev);
+ 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;
+ }
+
if (vdev->resetfn && !vdev->resetfn(vdev)) {
goto post_reset;
}
--
1.9.3
- [Qemu-devel] [RFC v9 14/18] vfio: improve vfio_pci_hot_reset to support more case, (continued)
- [Qemu-devel] [RFC v9 14/18] vfio: improve vfio_pci_hot_reset to support more case, Chen Fan, 2015/06/08
- Re: [Qemu-devel] [RFC v9 14/18] vfio: improve vfio_pci_hot_reset to support more case, Alex Williamson, 2015/06/09
- Re: [Qemu-devel] [RFC v9 14/18] vfio: improve vfio_pci_hot_reset to support more case, Chen Fan, 2015/06/16
- Re: [Qemu-devel] [RFC v9 14/18] vfio: improve vfio_pci_hot_reset to support more case, Alex Williamson, 2015/06/16
- Re: [Qemu-devel] [RFC v9 14/18] vfio: improve vfio_pci_hot_reset to support more case, Chen Fan, 2015/06/17
- Re: [Qemu-devel] [RFC v9 14/18] vfio: improve vfio_pci_hot_reset to support more case, Alex Williamson, 2015/06/17
- Re: [Qemu-devel] [RFC v9 14/18] vfio: improve vfio_pci_hot_reset to support more case, Chen Fan, 2015/06/18
[Qemu-devel] [RFC v9 11/18] vfio: add check host bus reset is support or not, Chen Fan, 2015/06/08
[Qemu-devel] [RFC v9 16/18] pcie_aer: expose pcie_aer_msg() interface, Chen Fan, 2015/06/08
[Qemu-devel] [RFC v9 15/18] vfio: do hot bus reset when do virtual secondary bus reset,
Chen Fan <=
[Qemu-devel] [RFC v9 17/18] vfio-pci: pass the aer error to guest, Chen Fan, 2015/06/08
[Qemu-devel] [RFC v9 18/18] vfio: add 'aer' property to expose aercap, Chen Fan, 2015/06/08
[Qemu-devel] [RFC v9 13/18] vfio: add sec_bus_reset notifier to notify physical bus reset is needed, Chen Fan, 2015/06/08