vfio: powerpc/spapr: Register memory and define IOMMU v2
[deliverable/linux.git] / arch / powerpc / include / asm / iommu.h
index 9d37492876897bbdfac858b547cdb8fbd9606910..f9957eb4c659ab5d5175a63bf9c182f49c2482bd 100644 (file)
@@ -112,9 +112,15 @@ struct iommu_table {
        unsigned long *it_map;       /* A simple allocation bitmap for now */
        unsigned long  it_page_shift;/* table iommu page size */
        struct list_head it_group_list;/* List of iommu_table_group_link */
+       unsigned long *it_userspace; /* userspace view of the table */
        struct iommu_table_ops *it_ops;
 };
 
+#define IOMMU_TABLE_USERSPACE_ENTRY(tbl, entry) \
+               ((tbl)->it_userspace ? \
+                       &((tbl)->it_userspace[(entry) - (tbl)->it_offset]) : \
+                       NULL)
+
 /* Pure 2^n version of get_order */
 static inline __attribute_const__
 int get_iommu_order(unsigned long size, struct iommu_table *tbl)
This page took 0.174637 seconds and 5 git commands to generate.