[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PATCH v4 10/18] spapr_pci: Define DDW callbacks
From: |
Alexey Kardashevskiy |
Subject: |
[Qemu-ppc] [PATCH v4 10/18] spapr_pci: Define DDW callbacks |
Date: |
Thu, 29 Jan 2015 20:27:22 +1100 |
This adds callbacks definitions which PHB needs to implement in order to
support dynamic DMA windows (DDW).
Will be squashed later.
Signed-off-by: Alexey Kardashevskiy <address@hidden>
Reviewed-by: David Gibson <address@hidden>
---
include/hw/pci-host/spapr.h | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h
index 5c91387..eec95f3 100644
--- a/include/hw/pci-host/spapr.h
+++ b/include/hw/pci-host/spapr.h
@@ -49,6 +49,27 @@ struct sPAPRPHBClass {
PCIHostBridgeClass parent_class;
void (*finish_realize)(sPAPRPHBState *sphb, Error **errp);
+
+/* sPAPR spec defined pagesize mask values */
+#define DDW_PGSIZE_4K 0x01
+#define DDW_PGSIZE_64K 0x02
+#define DDW_PGSIZE_16M 0x04
+#define DDW_PGSIZE_32M 0x08
+#define DDW_PGSIZE_64M 0x10
+#define DDW_PGSIZE_128M 0x20
+#define DDW_PGSIZE_256M 0x40
+#define DDW_PGSIZE_16G 0x80
+#define DDW_PGSIZE_MASK 0xFF
+
+ int (*ddw_query)(sPAPRPHBState *sphb, uint32_t *windows_supported,
+ uint32_t *page_size_mask,
+ uint32_t *dma32_window_size,
+ uint64_t *dma64_window_size);
+ int (*ddw_create)(sPAPRPHBState *sphb, uint32_t liobn,
+ uint32_t page_shift, uint32_t window_shift,
+ sPAPRTCETable **ptcet);
+ int (*ddw_remove)(sPAPRPHBState *sphb, sPAPRTCETable *tcet);
+ int (*ddw_reset)(sPAPRPHBState *sphb);
};
typedef struct spapr_pci_msi {
--
2.0.0
- [Qemu-ppc] [PATCH v4 05/18] spapr_pci: Make find_phb()/find_dev() public, (continued)
- [Qemu-ppc] [PATCH v4 05/18] spapr_pci: Make find_phb()/find_dev() public, Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 07/18] spapr_iommu: Implement free_table() helper, Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 02/18] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe, Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 04/18] spapr_vio: Introduce a liobn number generating macros, Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 06/18] spapr_iommu: Make spapr_tce_find_by_liobn() public, Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 14/18] vfio: Enable DDW ioctls to VFIO IOMMU driver, Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 17/18] target-ppc: kvm: make use of KVM_CREATE_SPAPR_TCE_64, Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 08/18] vfio: Add DMA memory registering, Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 01/18] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows, Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 11/18] spapr_pci/spapr_pci_vfio: Support Dynamic DMA Windows (DDW), Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 10/18] spapr_pci: Define DDW callbacks,
Alexey Kardashevskiy <=
- [Qemu-ppc] [PATCH v4 16/18] spapr_rtas_ddw: Workaround broken LE guests, Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 12/18] spapr_rtas: Add Dynamic DMA windows (DDW) RTAS handlers, Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 13/18] spapr_pci: Advertise dynamic DMA windows to guest, Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 18/18] vfio: Enable in-kernel acceleration via VFIO KVM device, Alexey Kardashevskiy, 2015/01/29
- [Qemu-ppc] [PATCH v4 03/18] spapr_pci: Introduce a liobn number generating macros, Alexey Kardashevskiy, 2015/01/29
- Re: [Qemu-ppc] [PATCH v4 00/18] spapr: vfio: Enable Dynamic DMA windows (DDW), Alexey Kardashevskiy, 2015/01/29