Re: [PATCH v13 1/6] iommu: Deprecate Intel and AMD cmdline methods to enable strict mode

From: John Garry
Date: Fri Jun 18 2021 - 03:49:53 EST


On 17/06/2021 20:01, Robin Murphy wrote:
              DMA.
-        strict [Default Off]
+        strict [Default Off] [Deprecated, use iommu.strict instead]
              With this option on every unmap_single operation will
              result in a hardware IOTLB flush operation as opposed
              to batching them for performance.

FWIW I'd be inclined to replace both whole descriptions with just something like "Deprecated, equivalent to iommu.strict=1".

diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index 46280e6e1535..9f3096d650aa 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -3098,8 +3098,10 @@ static int __init parse_amd_iommu_intr(char *str)
  static int __init parse_amd_iommu_options(char *str)
  {
      for (; *str; ++str) {
-        if (strncmp(str, "fullflush", 9) == 0)
+        if (strncmp(str, "fullflush", 9) == 0) {
+            pr_warn("amd_iommu=fullflush deprecated; use iommu.strict instead\n");

Nit: maybe we should spell out "...use <option>=1 instead" in all of these messages just in case anyone takes them literally?


(I'm not sure the options parse correctly with no argument)

I don't think they do.

But I'll take both suggestions on board.


Either way,

Acked-by: Robin Murphy <robin.murphy@xxxxxxx>

Cheers!