This patch adds iommu.h to define some generic definition for IOMMU. Here defines "struct pasid_table_info" for guest pasid table bind. Signed-off-by: Liu, Yi L <yi.l.liu@xxxxxxxxxxxxxxx> --- linux-headers/linux/iommu.h | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 linux-headers/linux/iommu.h diff --git a/linux-headers/linux/iommu.h b/linux-headers/linux/iommu.h new file mode 100644 index 0000000..4519dcf --- /dev/null +++ b/linux-headers/linux/iommu.h @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2017 Intel Corporation. + * Author: Yi Liu <yi.l.liu@xxxxxxxxxxxxxxx> + * + * This program is free software; you can redistribute it and/or modify it + * under the terms and conditions of the GNU General Public License, + * version 2, as published by the Free Software Foundation. + * + * This program is distributed in the hope it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + */ + +#ifndef __LINUX_IOMMU_H +#define __LINUX_IOMMU_H + +#include <linux/errno.h> + +struct pasid_table_info { + __u64 ptr; /* PASID table ptr */ + __u64 size; /* PASID table size*/ + __u32 model; /* magic number */ +#define INTEL_IOMMU (1 << 0) +#define ARM_SMMU (1 << 1) + __u8 opaque[];/* IOMMU-specific details */ +}; + +#endif /* __LINUX_IOMMU_H */ -- 1.9.1