[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH qemu v16 15/19] spapr_pci: Add and export DMA resettin
From: |
Alexey Kardashevskiy |
Subject: |
[Qemu-ppc] [PATCH qemu v16 15/19] spapr_pci: Add and export DMA resetting helper |
Date: |
Wed, 4 May 2016 16:52:27 +1000 |
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 aa9201b..5b9ccff 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -1486,9 +1486,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);
if (tcet && tcet->enabled) {
@@ -1498,6 +1497,13 @@ static void spapr_phb_reset(DeviceState *qdev)
/* Register default 32bit DMA window */
spapr_tce_table_enable(tcet, SPAPR_TCE_PAGE_SHIFT, sphb->dma_win_addr,
sphb->dma_win_size >> SPAPR_TCE_PAGE_SHIFT);
+}
+
+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
- Re: [Qemu-ppc] [PATCH qemu v16 18/19] vfio/spapr: Create DMA window dynamically (SPAPR IOMMU v2), (continued)
- [Qemu-ppc] [PATCH qemu v16 01/19] vfio: Delay DMA address space listener release, Alexey Kardashevskiy, 2016/05/04
- Re: [Qemu-ppc] [PATCH qemu v16 01/19] vfio: Delay DMA address space listener release, Alex Williamson, 2016/05/05
- Re: [Qemu-ppc] [PATCH qemu v16 01/19] vfio: Delay DMA address space listener release, Alexey Kardashevskiy, 2016/05/13
- Re: [Qemu-ppc] [PATCH qemu v16 01/19] vfio: Delay DMA address space listener release, Alex Williamson, 2016/05/13
- Re: [Qemu-ppc] [PATCH qemu v16 01/19] vfio: Delay DMA address space listener release, David Gibson, 2016/05/25
- Re: [Qemu-ppc] [PATCH qemu v16 01/19] vfio: Delay DMA address space listener release, Alex Williamson, 2016/05/25
- Re: [Qemu-ppc] [PATCH qemu v16 01/19] vfio: Delay DMA address space listener release, David Gibson, 2016/05/25
[Qemu-ppc] [PATCH qemu v16 06/19] spapr_pci: Use correct DMA LIOBN when composing the device tree, Alexey Kardashevskiy, 2016/05/04
[Qemu-ppc] [PATCH qemu v16 15/19] spapr_pci: Add and export DMA resetting helper,
Alexey Kardashevskiy <=
[Qemu-ppc] [PATCH qemu v16 07/19] spapr_iommu: Move table allocation to helpers, Alexey Kardashevskiy, 2016/05/04
[Qemu-ppc] [PATCH qemu v16 13/19] memory: Add reporting of supported page sizes, Alexey Kardashevskiy, 2016/05/04
Re: [Qemu-ppc] [PATCH qemu v16 00/19] spapr: vfio: Enable Dynamic DMA windows (DDW), Alexey Kardashevskiy, 2016/05/13