aboutsummaryrefslogtreecommitdiffstats
path: root/xen/include/xen/iommu.h
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2010-05-28 08:48:50 +0100
committerKeir Fraser <keir.fraser@citrix.com>2010-05-28 08:48:50 +0100
commit17d223ff4d895762b1b8b92178882665a7c42feb (patch)
tree9019d2fb6b82056e3cd1b7d20203c6f0d19718af /xen/include/xen/iommu.h
parent6a47fbab768d968172e19966312b30e3d1269e73 (diff)
downloadxen-17d223ff4d895762b1b8b92178882665a7c42feb.tar.gz
xen-17d223ff4d895762b1b8b92178882665a7c42feb.tar.bz2
xen-17d223ff4d895762b1b8b92178882665a7c42feb.zip
iommu: Specify access permissions to iommu_map_page().
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/include/xen/iommu.h')
-rw-r--r--xen/include/xen/iommu.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
index 3a418bc5ba..5181ffc5be 100644
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -68,8 +68,16 @@ int assign_device(struct domain *d, u8 bus, u8 devfn);
int deassign_device(struct domain *d, u8 bus, u8 devfn);
int iommu_get_device_group(struct domain *d, u8 bus, u8 devfn,
XEN_GUEST_HANDLE_64(uint32) buf, int max_sdevs);
-int iommu_map_page(struct domain *d, unsigned long gfn, unsigned long mfn);
+
+/* iommu_map_page() takes flags to direct the mapping operation. */
+#define _IOMMUF_readable 0
+#define IOMMUF_readable (1u<<_IOMMUF_readable)
+#define _IOMMUF_writable 1
+#define IOMMUF_writable (1u<<_IOMMUF_writable)
+int iommu_map_page(struct domain *d, unsigned long gfn, unsigned long mfn,
+ unsigned int flags);
int iommu_unmap_page(struct domain *d, unsigned long gfn);
+
void iommu_domain_teardown(struct domain *d);
int hvm_do_IRQ_dpci(struct domain *d, unsigned int irq);
int dpci_ioport_intercept(ioreq_t *p);
@@ -102,7 +110,8 @@ struct iommu_ops {
int (*remove_device)(struct pci_dev *pdev);
int (*assign_device)(struct domain *d, u8 bus, u8 devfn);
void (*teardown)(struct domain *d);
- int (*map_page)(struct domain *d, unsigned long gfn, unsigned long mfn);
+ int (*map_page)(struct domain *d, unsigned long gfn, unsigned long mfn,
+ unsigned int flags);
int (*unmap_page)(struct domain *d, unsigned long gfn);
int (*reassign_device)(struct domain *s, struct domain *t,
u8 bus, u8 devfn);