lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250928171718.436440-2-charan.kalla@oss.qualcomm.com>
Date: Sun, 28 Sep 2025 22:47:16 +0530
From: Charan Teja Kalla <charan.kalla@....qualcomm.com>
To: joro@...tes.org, will@...nel.org, robin.murphy@....com,
        saravanak@...gle.com, conor+dt@...nel.org, robh@...nel.org,
        mchehab@...nel.org, bod@...nel.org, krzk+dt@...nel.org,
        abhinav.kumar@...ux.dev, vikash.garodia@....qualcomm.com,
        dikshita.agarwal@....qualcomm.com
Cc: linux-media@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
        iommu@...ts.linux.dev,
        Charan Teja Kalla <charan.kalla@....qualcomm.com>
Subject: [RFC PATCH 1/3] dtbindings: add binding for iommu-map-masked property

Add bindings for iommu-map-masked property, which is used to represent
the IOMMU specifier pairs for each function of a multi-functional
platform device, where each function can emit unique master id that can
be associated with individual translation context. It contains syntax as
below:

iommu-map-masked = <FUNCTION_ID1 &iommu ID1 MASK1>,
		   <FUNCTION_ID2 &iommu ID2 MASK2>;

The right place for this binding to go is [1], but posting it here as
this is RFC. Please ignore the other concerns like ABI breakage, running
dt schema e.t.c.

[1] https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/iommu/iommu.yaml

Signed-off-by: Charan Teja Kalla <charan.kalla@....qualcomm.com>
---
 .../bindings/media/qcom,sm8550-iris.yaml      | 31 +++++++++++++++++--
 1 file changed, 28 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml b/Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml
index 9c4b760508b5..9940a3d7b8f9 100644
--- a/Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml
+++ b/Documentation/devicetree/bindings/media/qcom,sm8550-iris.yaml
@@ -75,7 +75,7 @@ properties:
       - const: core
 
   iommus:
-    maxItems: 2
+    maxItems: 1
 
   dma-coherent: true
 
@@ -87,6 +87,20 @@ properties:
   opp-table:
     type: object
 
+  iommu-map-masked:
+    $ref: /schemas/types.yaml#/definitions/uint32-array
+    description:
+      Maps function IDs to IOMMU specifiers for multi-functional devices,
+      and each function requires its own address space/translation context.
+
+      Each entry contains:-
+        a) Function - ID Identifier for the device function.
+        b) IOMMU phandle - Identifier for iommu.
+        c) Arguments - arguments representing iommu handle.
+
+    items:
+      maxItems: 4
+
 required:
   - compatible
   - power-domain-names
@@ -96,6 +110,7 @@ required:
   - reset-names
   - iommus
   - dma-coherent
+  - iommu-map-masked
 
 allOf:
   - if:
@@ -116,6 +131,16 @@ allOf:
         reset-names:
           maxItems: 1
 
+  - if:
+      properties:
+        iommu-map-masked: true
+    then:
+      not:
+        anyOf:
+          - required: [iommu-map]
+    description:
+      iommu-map-masked is mutually exclusive with iommu-map property.
+
 unevaluatedProperties: false
 
 examples:
@@ -156,8 +181,8 @@ examples:
         resets = <&gcc GCC_VIDEO_AXI0_CLK_ARES>;
         reset-names = "bus";
 
-        iommus = <&apps_smmu 0x1940 0x0000>,
-                 <&apps_smmu 0x1947 0x0000>;
+        iommus = <&apps_smmu 0x1940 0x0000>;
+        iommu-map-masked = <0x0 &apps_smmu 0x1947 0x0000>;
         dma-coherent;
 
         operating-points-v2 = <&iris_opp_table>;
-- 
2.34.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ