[PATCH v8 06/11] iommu/arm-smmu-v3: Introduce strtab init helper

2022-02-21 Thread Shameer Kolothum via iommu
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed,

[PATCH v8 07/11] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2022-02-21 Thread Shameer Kolothum via iommu
By default, disable_bypass flag is set and any dev without an iommu domain installs STE with CFG_ABORT during arm_smmu_init_bypass_stes(). Introduce a "force" flag and move the STE update logic to arm_smmu_init_bypass_stes() so that we can force it to install CFG_BYPASS STE for specific SIDs.

[PATCH v8 09/11] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2022-02-21 Thread Shameer Kolothum via iommu
From: Jon Nettleton Check if there is any RMR info associated with the devices behind the SMMU and if any, install bypass SMRs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMU during probe(). Signed-off-by: Jon Nettleton Signed-off-by:

[PATCH v8 10/11] iommu/arm-smmu-v3: Reserve any RMR regions associated with a dev

2022-02-21 Thread Shameer Kolothum via iommu
Get ACPI IORT RMR regions associated with a dev reserved so that there is a unity mapping for them in SMMU. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git

[PATCH v8 11/11] iommu/arm-smmu: Reserve any RMR regions associated with a dev

2022-02-21 Thread Shameer Kolothum via iommu
Get ACPI IORT RMR regions associated with a dev reserved so that there is a unity mapping for them in SMMU. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git

[PATCH v8 08/11] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2022-02-21 Thread Shameer Kolothum via iommu
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum ---

[PATCH v8 00/11] ACPI/IORT: Support for IORT RMR node

2022-02-21 Thread Shameer Kolothum via iommu
Hi, Since we now have an updated verion[0] of IORT spec(E.d) which addresses the memory attributes issues discussed here [1], this series now make use of it. The pull request for ACPICA E.d related changes are already raised and can be found here, https://github.com/acpica/acpica/pull/752 v7

[PATCH v8 05/11] ACPI/IORT: Add a helper to retrieve RMR memory regions

2022-02-21 Thread Shameer Kolothum via iommu
Add helper functions (iort_iommu_get/put_rmrs()) that retrieves/releases RMR memory descriptors associated with a given IOMMU. This will be used by IOMMU drivers to set up necessary mappings. Invoke it from the generic iommu helper functions. Signed-off-by: Shameer Kolothum ---

[PATCH v8 03/11] ACPI/IORT: Add helper functions to parse RMR nodes

2022-02-21 Thread Shameer Kolothum via iommu
The helper functions here parse through the IORT RMR nodes and populate a reserved region list corresponding to a given iommu and device(optional). These also go through the ID mappings of the RMR node and retrieves all the SIDs associated with a RMR descriptor. Signed-off-by: Shameer Kolothum

[PATCH v8 04/11] iommu/dma: Introduce generic helper to retrieve RMR info

2022-02-21 Thread Shameer Kolothum via iommu
Reserved Memory Regions(RMR) associated with an IOMMU can be described through ACPI IORT tables in systems with devices that require a unity mapping or bypass for those regions. Introduce a generic interface so that IOMMU drivers can retrieve and set up necessary mappings. Signed-off-by: Shameer

[PATCH v8 01/11] ACPI/IORT: Add temporary RMR node flag definitions

2022-02-21 Thread Shameer Kolothum via iommu
IORT rev E.d introduces more details into the RMR node Flags field. Add temporary definitions to describe and access these Flags field until ACPICA header is updated to support E.d. This patch can be reverted once the include/acpi/actbl2.h has all the relevant definitions. Signed-off-by: Shameer

[PATCH v8 02/11] iommu: Introduce a union to struct iommu_resv_region

2022-02-21 Thread Shameer Kolothum via iommu
A union is introduced to struct iommu_resv_region to hold any firmware specific data. This is in preparation to add support for IORT RMR reserve regions and the union now holds the RMR specific information. Signed-off-by: Shameer Kolothum --- include/linux/iommu.h | 9 + 1 file changed,

[PATCH v9 11/11] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2022-04-04 Thread Shameer Kolothum via iommu
From: Jon Nettleton Check if there is any RMR info associated with the devices behind the SMMU and if any, install bypass SMRs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMU during probe(). Signed-off-by: Jon Nettleton Signed-off-by:

[PATCH v9 07/11] ACPI/IORT: Add a helper to retrieve RMR info directly

2022-04-04 Thread Shameer Kolothum via iommu
This will provide a way for SMMU drivers to retrieve StreamIDs associated with IORT RMR nodes and use that to set bypass settings for those IDs. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 29 + include/linux/acpi_iort.h | 8 2 files

[PATCH v9 08/11] iommu/arm-smmu-v3: Introduce strtab init helper

2022-04-04 Thread Shameer Kolothum via iommu
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed,

[PATCH v9 06/11] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-04-04 Thread Shameer Kolothum via iommu
Parse through the IORT RMR nodes and populate the reserve region list corresponding to a given IOMMU and device(optional). Also, go through the ID mappings of the RMR node and retrieve all the SIDs associated with it. Now that we have this support, update iommu_dma_get/_put_resv_regions() paths

[PATCH v9 03/11] ACPI/IORT: Make iort_iommu_msi_get_resv_regions() return void

2022-04-04 Thread Shameer Kolothum via iommu
At present iort_iommu_msi_get_resv_regions() returns the number of MSI reserved regions on success and there are no users for this. The reserved region list will get populated anyway for platforms that require the HW MSI region reservation. Hence, change the function to return void instead.

[PATCH v9 00/11] ACPI/IORT: Support for IORT RMR node

2022-04-04 Thread Shameer Kolothum via iommu
Hi v8 --> v9  - Adressed comments from Robin on interfaces as discussed here[0].  - Addressed comments from Lorenzo.   Though functionally there aren't any major changes, the interfaces have changed from v8 and for that reason not included the T-by tags from Steve and Eric yet(Many thanks for

[PATCH v9 04/11] ACPI/IORT: Provide a generic helper to retrieve reserve regions

2022-04-04 Thread Shameer Kolothum via iommu
Currently IORT provides a helper to retrieve HW MSI reserve regions. Change this to a generic helper to retrieve any IORT related reserve regions. This will be useful when we add support for RMR nodes in subsequent patches. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 23

[PATCH v9 01/11] ACPI/IORT: Add temporary RMR node flag definitions

2022-04-04 Thread Shameer Kolothum via iommu
IORT rev E.d introduces more details into the RMR node Flags field. Add temporary definitions to describe and access these Flags field until ACPICA header is updated to support E.d. This patch can be reverted once the include/acpi/actbl2.h has all the relevant definitions. Signed-off-by: Shameer

[PATCH v9 05/11] iommu/dma: Introduce a helper to remove reserved regions

2022-04-04 Thread Shameer Kolothum via iommu
Currently drivers use generic_iommu_put_resv_regions() to remove reserved regions. Introduce a dma-iommu specific reserve region removal helper(iommu_dma_put_resv_regions()). This will be useful when we introduce reserve regions with any firmware specific memory allocations(eg: IORT RMR) that have

[PATCH v9 02/11] iommu: Introduce a union to struct iommu_resv_region

2022-04-04 Thread Shameer Kolothum via iommu
A union is introduced to struct iommu_resv_region to hold any firmware specific data. This is in preparation to add support for IORT RMR reserve regions and the union now holds the RMR specific information. Signed-off-by: Shameer Kolothum --- include/linux/iommu.h | 9 + 1 file changed,

[PATCH v9 10/11] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2022-04-04 Thread Shameer Kolothum via iommu
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum ---

[PATCH v9 09/11] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2022-04-04 Thread Shameer Kolothum via iommu
By default, disable_bypass flag is set and any dev without an iommu domain installs STE with CFG_ABORT during arm_smmu_init_bypass_stes(). Introduce a "force" flag and move the STE update logic to arm_smmu_init_bypass_stes() so that we can force it to install CFG_BYPASS STE for specific SIDs.

[PATCH v11 9/9] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2022-04-22 Thread Shameer Kolothum via iommu
From: Jon Nettleton Check if there is any RMR info associated with the devices behind the SMMU and if any, install bypass SMRs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMU during probe(). Signed-off-by: Jon Nettleton Signed-off-by:

[PATCH v11 8/9] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2022-04-22 Thread Shameer Kolothum via iommu
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum ---

[PATCH v11 0/9] ACPI/IORT: Support for IORT RMR node

2022-04-22 Thread Shameer Kolothum via iommu
Hi v9 --> v10  -Addressed Christoph's comments. We now have a callback to struct iommu_resv_region to free all related memory and also dropped the FW specific union and now has a container struct iommu_iort_rmr_data. See patches #1 & #4 -Added R-by from Christoph. -Dropped R-by from

[PATCH v11 1/9] iommu: Introduce a callback to struct iommu_resv_region

2022-04-22 Thread Shameer Kolothum via iommu
A callback is introduced to struct iommu_resv_region to free memory allocations associated with the reserved region. This will be useful when we introduce support for IORT RMR based reserved regions. Signed-off-by: Shameer Kolothum --- drivers/iommu/iommu.c | 16 +++-

[PATCH v11 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-04-22 Thread Shameer Kolothum via iommu
Parse through the IORT RMR nodes and populate the reserve region list corresponding to a given IOMMU and device(optional). Also, go through the ID mappings of the RMR node and retrieve all the SIDs associated with it. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 290

[PATCH v11 2/9] ACPI/IORT: Make iort_iommu_msi_get_resv_regions() return void

2022-04-22 Thread Shameer Kolothum via iommu
At present iort_iommu_msi_get_resv_regions() returns the number of MSI reserved regions on success and there are no users for this. The reserved region list will get populated anyway for platforms that require the HW MSI region reservation. Hence, change the function to return void instead.

[PATCH v11 3/9] ACPI/IORT: Provide a generic helper to retrieve reserve regions

2022-04-22 Thread Shameer Kolothum via iommu
Currently IORT provides a helper to retrieve HW MSI reserve regions. Change this to a generic helper to retrieve any IORT related reserve regions. This will be useful when we add support for RMR nodes in subsequent patches. [Lorenzo: For ACPI IORT] Reviewed-by: Lorenzo Pieralisi Reviewed-by:

[PATCH v11 5/9] ACPI/IORT: Add a helper to retrieve RMR info directly

2022-04-22 Thread Shameer Kolothum via iommu
This will provide a way for SMMU drivers to retrieve StreamIDs associated with IORT RMR nodes and use that to set bypass settings for those IDs. Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 28 include/linux/acpi_iort.h | 8 2 files

[PATCH v11 7/9] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2022-04-22 Thread Shameer Kolothum via iommu
By default, disable_bypass flag is set and any dev without an iommu domain installs STE with CFG_ABORT during arm_smmu_init_bypass_stes(). Introduce a "force" flag and move the STE update logic to arm_smmu_init_bypass_stes() so that we can force it to install CFG_BYPASS STE for specific SIDs.

[PATCH v11 6/9] iommu/arm-smmu-v3: Introduce strtab init helper

2022-04-22 Thread Shameer Kolothum via iommu
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed,

[PATCH v10 2/9] ACPI/IORT: Make iort_iommu_msi_get_resv_regions() return void

2022-04-20 Thread Shameer Kolothum via iommu
At present iort_iommu_msi_get_resv_regions() returns the number of MSI reserved regions on success and there are no users for this. The reserved region list will get populated anyway for platforms that require the HW MSI region reservation. Hence, change the function to return void instead.

[PATCH v10 0/9] ACPI/IORT: Support for IORT RMR node

2022-04-20 Thread Shameer Kolothum via iommu
Hi v9 --> v10 - Dropped patch #1 ("Add temporary RMR node flag definitions") since the ACPICA header updates patch is now in the mailing list[1] - Based on the suggestion from Christoph, introduced a resv_region_free_fw_data() callback in struct iommu_resv_region and used that to free

[PATCH v10 3/9] ACPI/IORT: Provide a generic helper to retrieve reserve regions

2022-04-20 Thread Shameer Kolothum via iommu
Currently IORT provides a helper to retrieve HW MSI reserve regions. Change this to a generic helper to retrieve any IORT related reserve regions. This will be useful when we add support for RMR nodes in subsequent patches. [Lorenzo: For ACPI IORT] Reviewed-by: Lorenzo Pieralisi Tested-by:

[PATCH v10 1/9] iommu: Introduce a union to struct iommu_resv_region

2022-04-20 Thread Shameer Kolothum via iommu
A union is introduced to struct iommu_resv_region to hold any firmware specific data. Also, provided a callback to free up any firmware specific memory allocations. This is in preparation to add support for IORT RMR reserve regions and the union now holds the RMR specific information. Tested-by:

[PATCH v10 7/9] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2022-04-20 Thread Shameer Kolothum via iommu
By default, disable_bypass flag is set and any dev without an iommu domain installs STE with CFG_ABORT during arm_smmu_init_bypass_stes(). Introduce a "force" flag and move the STE update logic to arm_smmu_init_bypass_stes() so that we can force it to install CFG_BYPASS STE for specific SIDs.

[PATCH v10 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-04-20 Thread Shameer Kolothum via iommu
Parse through the IORT RMR nodes and populate the reserve region list corresponding to a given IOMMU and device(optional). Also, go through the ID mappings of the RMR node and retrieve all the SIDs associated with it. Also make sure we update generic_iommu_put_resv_regions() with

[PATCH v10 5/9] ACPI/IORT: Add a helper to retrieve RMR info directly

2022-04-20 Thread Shameer Kolothum via iommu
This will provide a way for SMMU drivers to retrieve StreamIDs associated with IORT RMR nodes and use that to set bypass settings for those IDs. Reviewed-by: Lorenzo Pieralisi Tested-by: Steven Price Tested-by: Laurentiu Tudor Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c |

[PATCH v10 6/9] iommu/arm-smmu-v3: Introduce strtab init helper

2022-04-20 Thread Shameer Kolothum via iommu
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed,

[PATCH v10 9/9] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2022-04-20 Thread Shameer Kolothum via iommu
From: Jon Nettleton Check if there is any RMR info associated with the devices behind the SMMU and if any, install bypass SMRs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMU during probe(). Signed-off-by: Jon Nettleton Signed-off-by:

[PATCH v10 8/9] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2022-04-20 Thread Shameer Kolothum via iommu
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum ---

[PATCH v13 9/9] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2022-06-15 Thread Shameer Kolothum via iommu
From: Jon Nettleton Check if there is any RMR info associated with the devices behind the SMMU and if any, install bypass SMRs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMU during probe(). Signed-off-by: Jon Nettleton Signed-off-by:

[PATCH v13 0/9] ACPI/IORT: Support for IORT RMR node

2022-06-15 Thread Shameer Kolothum via iommu
Hi v12 --> v13 -No changes. Rebased to 5.19-rc1. -Picked up tags received from Laurentiu, Hanjun and Will. Thanks!. Thanks, Shameer From old: We have faced issues with 3408iMR RAID controller cards which fail to boot when SMMU is enabled. This is because these controllers make use of host

[PATCH v13 1/9] iommu: Introduce a callback to struct iommu_resv_region

2022-06-15 Thread Shameer Kolothum via iommu
A callback is introduced to struct iommu_resv_region to free memory allocations associated with the reserved region. This will be useful when we introduce support for IORT RMR based reserved regions. Reviewed-by: Christoph Hellwig Tested-by: Steven Price Tested-by: Laurentiu Tudor Tested-by:

[PATCH v13 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-06-15 Thread Shameer Kolothum via iommu
Parse through the IORT RMR nodes and populate the reserve region list corresponding to a given IOMMU and device(optional). Also, go through the ID mappings of the RMR node and retrieve all the SIDs associated with it. Reviewed-by: Lorenzo Pieralisi Tested-by: Steven Price Tested-by: Laurentiu

[PATCH v13 2/9] ACPI/IORT: Make iort_iommu_msi_get_resv_regions() return void

2022-06-15 Thread Shameer Kolothum via iommu
At present iort_iommu_msi_get_resv_regions() returns the number of MSI reserved regions on success and there are no users for this. The reserved region list will get populated anyway for platforms that require the HW MSI region reservation. Hence, change the function to return void instead.

[PATCH v13 3/9] ACPI/IORT: Provide a generic helper to retrieve reserve regions

2022-06-15 Thread Shameer Kolothum via iommu
Currently IORT provides a helper to retrieve HW MSI reserve regions. Change this to a generic helper to retrieve any IORT related reserve regions. This will be useful when we add support for RMR nodes in subsequent patches. [Lorenzo: For ACPI IORT] Reviewed-by: Lorenzo Pieralisi Reviewed-by:

[PATCH v13 6/9] iommu/arm-smmu-v3: Introduce strtab init helper

2022-06-15 Thread Shameer Kolothum via iommu
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Tested-by: Hanjun Guo Acked-by: Will Deacon Signed-off-by: Shameer Kolothum ---

[PATCH v13 5/9] ACPI/IORT: Add a helper to retrieve RMR info directly

2022-06-15 Thread Shameer Kolothum via iommu
This will provide a way for SMMU drivers to retrieve StreamIDs associated with IORT RMR nodes and use that to set bypass settings for those IDs. Tested-by: Steven Price Tested-by: Laurentiu Tudor Tested-by: Hanjun Guo Reviewed-by: Hanjun Guo Signed-off-by: Shameer Kolothum ---

[PATCH v13 8/9] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2022-06-15 Thread Shameer Kolothum via iommu
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Tested-by: Hanjun Guo Signed-off-by: Shameer Kolothum ---

[PATCH v13 7/9] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2022-06-15 Thread Shameer Kolothum via iommu
By default, disable_bypass flag is set and any dev without an iommu domain installs STE with CFG_ABORT during arm_smmu_init_bypass_stes(). Introduce a "force" flag and move the STE update logic to arm_smmu_init_bypass_stes() so that we can force it to install CFG_BYPASS STE for specific SIDs.

[PATCH v12 6/9] iommu/arm-smmu-v3: Introduce strtab init helper

2022-05-03 Thread Shameer Kolothum via iommu
Introduce a helper to check the sid range and to init the l2 strtab entries(bypass). This will be useful when we have to initialize the l2 strtab with bypass for RMR SIDs. Signed-off-by: Shameer Kolothum --- drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c | 28 +++-- 1 file changed,

[PATCH v12 7/9] iommu/arm-smmu-v3: Refactor arm_smmu_init_bypass_stes() to force bypass

2022-05-03 Thread Shameer Kolothum via iommu
By default, disable_bypass flag is set and any dev without an iommu domain installs STE with CFG_ABORT during arm_smmu_init_bypass_stes(). Introduce a "force" flag and move the STE update logic to arm_smmu_init_bypass_stes() so that we can force it to install CFG_BYPASS STE for specific SIDs.

[PATCH v12 8/9] iommu/arm-smmu-v3: Get associated RMR info and install bypass STE

2022-05-03 Thread Shameer Kolothum via iommu
Check if there is any RMR info associated with the devices behind the SMMUv3 and if any, install bypass STEs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMUv3 during probe(). Signed-off-by: Shameer Kolothum ---

[PATCH v12 9/9] iommu/arm-smmu: Get associated RMR info and install bypass SMR

2022-05-03 Thread Shameer Kolothum via iommu
From: Jon Nettleton Check if there is any RMR info associated with the devices behind the SMMU and if any, install bypass SMRs for them. This is to keep any ongoing traffic associated with these devices alive when we enable/reset SMMU during probe(). Signed-off-by: Jon Nettleton Signed-off-by:

[PATCH v12 3/9] ACPI/IORT: Provide a generic helper to retrieve reserve regions

2022-05-03 Thread Shameer Kolothum via iommu
Currently IORT provides a helper to retrieve HW MSI reserve regions. Change this to a generic helper to retrieve any IORT related reserve regions. This will be useful when we add support for RMR nodes in subsequent patches. [Lorenzo: For ACPI IORT] Reviewed-by: Lorenzo Pieralisi Reviewed-by:

[PATCH v12 0/9] ACPI/IORT: Support for IORT RMR node

2022-05-03 Thread Shameer Kolothum via iommu
Hi v11 --> v12 -Minor fix in patch #4 to address the issue reported by the kernel test robot. -Added R-by tags by Christoph(patch #1) and Lorenzo(patch #4). -Added T-by from Steve to all relevant patches. Many thanks!. Please note, this series has a dependency on the ACPICA header patch

[PATCH v12 4/9] ACPI/IORT: Add support to retrieve IORT RMR reserved regions

2022-05-03 Thread Shameer Kolothum via iommu
Parse through the IORT RMR nodes and populate the reserve region list corresponding to a given IOMMU and device(optional). Also, go through the ID mappings of the RMR node and retrieve all the SIDs associated with it. Reviewed-by: Lorenzo Pieralisi Tested-by: Steven Price Signed-off-by: Shameer

[PATCH v12 2/9] ACPI/IORT: Make iort_iommu_msi_get_resv_regions() return void

2022-05-03 Thread Shameer Kolothum via iommu
At present iort_iommu_msi_get_resv_regions() returns the number of MSI reserved regions on success and there are no users for this. The reserved region list will get populated anyway for platforms that require the HW MSI region reservation. Hence, change the function to return void instead.

[PATCH v12 5/9] ACPI/IORT: Add a helper to retrieve RMR info directly

2022-05-03 Thread Shameer Kolothum via iommu
This will provide a way for SMMU drivers to retrieve StreamIDs associated with IORT RMR nodes and use that to set bypass settings for those IDs. Tested-by: Steven Price Signed-off-by: Shameer Kolothum --- drivers/acpi/arm64/iort.c | 28 include/linux/acpi_iort.h |

[PATCH v12 1/9] iommu: Introduce a callback to struct iommu_resv_region

2022-05-03 Thread Shameer Kolothum via iommu
A callback is introduced to struct iommu_resv_region to free memory allocations associated with the reserved region. This will be useful when we introduce support for IORT RMR based reserved regions. Reviewed-by: Christoph Hellwig Tested-by: Steven Price Signed-off-by: Shameer Kolothum ---