History

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.

Jacob Pan committed 5 years ago

Commit bb0f6151 parent f68c7f52 files · +5 −1Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/iommu.h+2−1
@@ -288,7 +288,8 @@ struct iommu_gpasid_bind_data_vtd { · 287 unmodified lines
288288 #define IOMMU_SVA_VTD_GPASID_PWT (1 << 3) /* page-level write through */
289289 #define IOMMU_SVA_VTD_GPASID_EMTE (1 << 4) /* extended mem type enable */
290290 #define IOMMU_SVA_VTD_GPASID_CD (1 << 5) /* PASID-level cache disable */
291−#define IOMMU_SVA_VTD_GPASID_LAST (1 << 6)
291+#define IOMMU_SVA_VTD_GPASID_WPE (1 << 6) /* Write protect enable */
292+#define IOMMU_SVA_VTD_GPASID_LAST (1 << 7)
292293 __u64 flags;
293294 __u32 pat;
294295 __u32 emt;