···2222/* Extensions */
23232424#define VFIO_TYPE1_IOMMU 1
2525+#define VFIO_SPAPR_TCE_IOMMU 2
25262627/*
2728 * The IOCTL interface is designed for extensibility by embedding the
···361362#define VFIO_IOMMU_MAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 13)
362363363364/**
364364- * VFIO_IOMMU_UNMAP_DMA - _IOW(VFIO_TYPE, VFIO_BASE + 14, struct vfio_dma_unmap)
365365+ * VFIO_IOMMU_UNMAP_DMA - _IOWR(VFIO_TYPE, VFIO_BASE + 14,
366366+ * struct vfio_dma_unmap)
365367 *
366368 * Unmap IO virtual addresses using the provided struct vfio_dma_unmap.
367367- * Caller sets argsz.
369369+ * Caller sets argsz. The actual unmapped size is returned in the size
370370+ * field. No guarantee is made to the user that arbitrary unmaps of iova
371371+ * or size different from those used in the original mapping call will
372372+ * succeed.
368373 */
369374struct vfio_iommu_type1_dma_unmap {
370375 __u32 argsz;
···374379};
375380376381#define VFIO_IOMMU_UNMAP_DMA _IO(VFIO_TYPE, VFIO_BASE + 14)
382382+383383+/*
384384+ * IOCTLs to enable/disable IOMMU container usage.
385385+ * No parameters are supported.
386386+ */
387387+#define VFIO_IOMMU_ENABLE _IO(VFIO_TYPE, VFIO_BASE + 15)
388388+#define VFIO_IOMMU_DISABLE _IO(VFIO_TYPE, VFIO_BASE + 16)
389389+390390+/* -------- Additional API for SPAPR TCE (Server POWERPC) IOMMU -------- */
391391+392392+/*
393393+ * The SPAPR TCE info struct provides the information about the PCI bus
394394+ * address ranges available for DMA, these values are programmed into
395395+ * the hardware so the guest has to know that information.
396396+ *
397397+ * The DMA 32 bit window start is an absolute PCI bus address.
398398+ * The IOVA address passed via map/unmap ioctls are absolute PCI bus
399399+ * addresses too so the window works as a filter rather than an offset
400400+ * for IOVA addresses.
401401+ *
402402+ * A flag will need to be added if other page sizes are supported,
403403+ * so as defined here, it is always 4k.
404404+ */
405405+struct vfio_iommu_spapr_tce_info {
406406+ __u32 argsz;
407407+ __u32 flags; /* reserved for future use */
408408+ __u32 dma32_window_start; /* 32 bit window start (bytes) */
409409+ __u32 dma32_window_size; /* 32 bit window size (bytes) */
410410+};
411411+412412+#define VFIO_IOMMU_SPAPR_TCE_GET_INFO _IO(VFIO_TYPE, VFIO_BASE + 12)
413413+414414+/* ***************************************************************** */
377415378416#endif /* VFIO_H */
+3
linux-headers/linux/virtio_config.h
···5151 * suppressed them? */
5252#define VIRTIO_F_NOTIFY_ON_EMPTY 24
53535454+/* Can the device handle any descriptor layout? */
5555+#define VIRTIO_F_ANY_LAYOUT 27
5656+5457#endif /* _LINUX_VIRTIO_CONFIG_H */