[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH qemu v14 14/18] spapr_pci: Add and export DMA resett
From: |
Alexey Kardashevskiy |
Subject: |
[Qemu-devel] [PATCH qemu v14 14/18] spapr_pci: Add and export DMA resetting helper |
Date: |
Mon, 21 Mar 2016 18:47:02 +1100 |
This will be later used by the "ibm,reset-pe-dma-window" RTAS handler
which resets the DMA configuration to the defaults.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: David Gibson <address@hidden>
---
hw/ppc/spapr_pci.c | 10 ++++++++--
include/hw/pci-host/spapr.h | 2 ++
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 1e53dad..bfcafdf 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -1521,9 +1521,8 @@ static int spapr_phb_children_reset(Object *child, void
*opaque)
return 0;
}
-static void spapr_phb_reset(DeviceState *qdev)
+void spapr_phb_dma_reset(sPAPRPHBState *sphb)
{
- sPAPRPHBState *sphb = SPAPR_PCI_HOST_BRIDGE(qdev);
sPAPRTCETable *tcet = spapr_tce_find_by_liobn(sphb->dma_liobn);
Error *local_err = NULL;
@@ -1538,6 +1537,13 @@ static void spapr_phb_reset(DeviceState *qdev)
if (local_err) {
error_report_err(local_err);
}
+}
+
+static void spapr_phb_reset(DeviceState *qdev)
+{
+ sPAPRPHBState *sphb = SPAPR_PCI_HOST_BRIDGE(qdev);
+
+ spapr_phb_dma_reset(sphb);
/* Reset the IOMMU state */
object_child_foreach(OBJECT(qdev), spapr_phb_children_reset, NULL);
diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
index 03ee006..7848366 100644
--- a/include/hw/pci-host/spapr.h
+++ b/include/hw/pci-host/spapr.h
@@ -147,4 +147,6 @@ static inline void spapr_phb_vfio_reset(DeviceState *qdev)
}
#endif
+void spapr_phb_dma_reset(sPAPRPHBState *sphb);
+
#endif /* __HW_SPAPR_PCI_H__ */
--
2.5.0.rc3
- [Qemu-devel] [PATCH qemu v14 00/18] spapr: vfio: Enable Dynamic DMA windows (DDW), Alexey Kardashevskiy, 2016/03/21
- [Qemu-devel] [PATCH qemu v14 08/18] spapr_iommu: Migrate full state, Alexey Kardashevskiy, 2016/03/21
- [Qemu-devel] [PATCH qemu v14 14/18] spapr_pci: Add and export DMA resetting helper,
Alexey Kardashevskiy <=
- [Qemu-devel] [PATCH qemu v14 15/18] vfio: Add host side IOMMU capabilities, Alexey Kardashevskiy, 2016/03/21
- [Qemu-devel] [PATCH qemu v14 17/18] vfio/spapr: Use VFIO_SPAPR_TCE_v2_IOMMU, Alexey Kardashevskiy, 2016/03/21
- Re: [Qemu-devel] [PATCH qemu v14 17/18] vfio/spapr: Use VFIO_SPAPR_TCE_v2_IOMMU, David Gibson, 2016/03/22
- Re: [Qemu-devel] [PATCH qemu v14 17/18] vfio/spapr: Use VFIO_SPAPR_TCE_v2_IOMMU, Alexey Kardashevskiy, 2016/03/22
- Re: [Qemu-devel] [PATCH qemu v14 17/18] vfio/spapr: Use VFIO_SPAPR_TCE_v2_IOMMU, David Gibson, 2016/03/22
- Re: [Qemu-devel] [PATCH qemu v14 17/18] vfio/spapr: Use VFIO_SPAPR_TCE_v2_IOMMU, Alexey Kardashevskiy, 2016/03/22
- Re: [Qemu-devel] [PATCH qemu v14 17/18] vfio/spapr: Use VFIO_SPAPR_TCE_v2_IOMMU, David Gibson, 2016/03/22
- Re: [Qemu-devel] [PATCH qemu v14 17/18] vfio/spapr: Use VFIO_SPAPR_TCE_v2_IOMMU, Alexey Kardashevskiy, 2016/03/22