diff options
author | Jacob Pan <jacob.jun.pan@linux.intel.com> | 2021-03-02 13:13:58 +0300 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2021-03-18 13:42:46 +0300 |
commit | bb0f61533dfd6aa815a2719720c77d13f840b683 (patch) | |
tree | 2f4f9591d4551afb362fefa75bdf0b8d48a6cb66 /include/uapi/linux/iommu.h | |
parent | f68c7f539b6e9712e941212ab95a1feb5a0bf3b3 (diff) | |
download | linux-bb0f61533dfd6aa815a2719720c77d13f840b683.tar.xz |
iommu/vt-d: Enable write protect propagation from guest
Write protect bit, when set, inhibits supervisor writes to the read-only
pages. In guest supervisor shared virtual addressing (SVA), write-protect
should be honored upon guest bind supervisor PASID request.
This patch extends the VT-d portion of the IOMMU UAPI to include WP bit.
WPE bit of the supervisor PASID entry will be set to match CPU CR0.WP bit.
Signed-off-by: Sanjay Kumar <sanjay.k.kumar@intel.com>
Signed-off-by: Jacob Pan <jacob.jun.pan@linux.intel.com>
Acked-by: Lu Baolu <baolu.lu@linux.intel.com>
Link: https://lore.kernel.org/r/1614680040-1989-3-git-send-email-jacob.jun.pan@linux.intel.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/uapi/linux/iommu.h')
-rw-r--r-- | include/uapi/linux/iommu.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/uapi/linux/iommu.h b/include/uapi/linux/iommu.h index e1d9e75f2c94..59178fc229ca 100644 --- a/include/uapi/linux/iommu.h +++ b/include/uapi/linux/iommu.h @@ -288,7 +288,8 @@ struct iommu_gpasid_bind_data_vtd { #define IOMMU_SVA_VTD_GPASID_PWT (1 << 3) /* page-level write through */ #define IOMMU_SVA_VTD_GPASID_EMTE (1 << 4) /* extended mem type enable */ #define IOMMU_SVA_VTD_GPASID_CD (1 << 5) /* PASID-level cache disable */ -#define IOMMU_SVA_VTD_GPASID_LAST (1 << 6) +#define IOMMU_SVA_VTD_GPASID_WPE (1 << 6) /* Write protect enable */ +#define IOMMU_SVA_VTD_GPASID_LAST (1 << 7) __u64 flags; __u32 pat; __u32 emt; |