aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/vfio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/uapi/linux/vfio.h')
-rw-r--r--include/uapi/linux/vfio.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
index 284ff2436829..87ee4f4cff25 100644
--- a/include/uapi/linux/vfio.h
+++ b/include/uapi/linux/vfio.h
@@ -22,6 +22,7 @@
22/* Extensions */ 22/* Extensions */
23 23
24#define VFIO_TYPE1_IOMMU 1 24#define VFIO_TYPE1_IOMMU 1
25#define VFIO_SPAPR_TCE_IOMMU 2
25 26
26/* 27/*
27 * The IOCTL interface is designed for extensibility by embedding the 28 * The IOCTL interface is designed for extensibility by embedding the
@@ -375,4 +376,37 @@ struct vfio_iommu_type1_dma_unmap {
375 376
376#define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 14) 377#define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 14)
377 378
379/*
380 * IOCTLs to enable/disable IOMMU container usage.
381 * No parameters are supported.
382 */
383#define VFIO_IOMMU_ENABLE _IO(VFIO_TYPE, VFIO_BASE + 15)
384#define VFIO_IOMMU_DISABLE _IO(VFIO_TYPE, VFIO_BASE + 16)
385
386/* -------- Additional API for SPAPR TCE (Server POWERPC) IOMMU -------- */
387
388/*
389 * The SPAPR TCE info struct provides the information about the PCI bus
390 * address ranges available for DMA, these values are programmed into
391 * the hardware so the guest has to know that information.
392 *
393 * The DMA 32 bit window start is an absolute PCI bus address.
394 * The IOVA address passed via map/unmap ioctls are absolute PCI bus
395 * addresses too so the window works as a filter rather than an offset
396 * for IOVA addresses.
397 *
398 * A flag will need to be added if other page sizes are supported,
399 * so as defined here, it is always 4k.
400 */
401struct vfio_iommu_spapr_tce_info {
402 __u32 argsz;
403 __u32 flags; /* reserved for future use */
404 __u32 dma32_window_start; /* 32 bit window start (bytes) */
405 __u32 dma32_window_size; /* 32 bit window size (bytes) */
406};
407
408#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
409
410/* ***************************************************************** */
411
378#endif /* _UAPIVFIO_H */ 412#endif /* _UAPIVFIO_H */