[PATCH V3 1/3] iommu/vt-d: Modify the format of intel DMAR tables dump

2019-05-24 Thread Sai Praneeth Prakhya
Baolu Cc: Sohil Mehta Cc: David Woodhouse Cc: Jacob Pan Cc: Andy Shevchenko Reviewed-by: Lu Baolu Reviewed-by: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/intel-iommu-debugfs.c | 65 +++-- 1 file changed, 41 insertions(+), 24 deletion

[PATCH V3 2/3] iommu/vt-d: Introduce macros useful for dumping DMAR table

2019-05-24 Thread Sai Praneeth Prakhya
Mehta Cc: David Woodhouse Cc: Jacob Pan Cc: Andy Shevchenko Reviewed-by: Lu Baolu Reviewed-by: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/intel-iommu.c | 6 +- drivers/iommu/intel-pasid.c | 17 - drivers/iommu/intel-pasid.h | 26

[PATCH V3 0/3] Add debugfs support to show scalable mode DMAR table

2019-05-24 Thread Sai Praneeth Prakhya
lt (PASID directory pointer is undefined for non-scalable DMAR's). To fix this, dereference PASID directory pointer only when 1. PASID is supported and 2. PASID is enabled. This patch is tested on 1. Non-scalable DMAR with and without iommu=pt 2. Scalable DMAR with and without iommu=pt Sai Pr

[PATCH V3 3/3] iommu/vt-d: Add debugfs support to show scalable mode DMAR table internals

2019-05-24 Thread Sai Praneeth Prakhya
defaulted to -1 indicating that PASID and it's related fields are invalid. Cc: Joerg Roedel Cc: Ashok Raj Cc: Lu Baolu Cc: Sohil Mehta Cc: David Woodhouse Cc: Jacob Pan Cc: Andy Shevchenko Reviewed-by: Lu Baolu Reviewed-by: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya --- dri

Re: Device specific pass through in host systems - discuss user interface

2019-06-07 Thread Sai Praneeth Prakhya
> It's interesting to see this from a fresh angle which isn't clouded by > other SoC GPU details - thanks for the proposal! A couple more thoughts > jump out immediately... > Thanks a lot! for jumping in and providing your valuable insights :) Sorry! for taking time to reply on this. Did

Re: Device specific pass through in host systems - discuss user interface

2019-06-08 Thread Sai Praneeth Prakhya
On Sat, 2019-06-08 at 09:27 +0200, h...@lst.de wrote: > Just curious, what exactly is the use case? Explaining how someone > would wan to use this should drive the way we design an interface for it. Makes sense. Some example use cases: 1. Assume an SR-IOV device and if the admin decides to use

Re: [PATCH 5/6] iommu/vt-d: Cleanup after delegating DMA domain to generic iommu

2019-06-10 Thread Sai Praneeth Prakhya
On Mon, 2019-06-10 at 11:45 -0700, Mehta, Sohil wrote: > On Sun, 2019-06-09 at 10:38 +0800, Lu Baolu wrote: > > static int __init si_domain_init(int hw) > > @@ -3306,14 +3252,13 @@ static int __init init_dmars(void) > > if (pasid_supported(iommu)) > >

[PATCH V2 1/3] iommu/vt-d: Modify the format of intel DMAR tables dump

2019-05-10 Thread Sai Praneeth Prakhya
Baolu Cc: Sohil Mehta Cc: David Woodhouse Cc: Jacob Pan Cc: Andy Shevchenko Reviewed-by: Lu Baolu Reviewed-by: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/intel-iommu-debugfs.c | 65 +++-- 1 file changed, 41 insertions(+), 24 deletion

[PATCH V2 3/3] iommu/vt-d: Add debugfs support to show scalable mode DMAR table internals

2019-05-10 Thread Sai Praneeth Prakhya
defaulted to -1 indicating that PASID and it's related fields are invalid. Cc: Joerg Roedel Cc: Ashok Raj Cc: Lu Baolu Cc: Sohil Mehta Cc: David Woodhouse Cc: Jacob Pan Cc: Andy Shevchenko Reviewed-by: Lu Baolu Reviewed-by: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya --- dri

[PATCH V2 0/3] Add debugfs support to show scalable mode DMAR table

2019-05-10 Thread Sai Praneeth Prakhya
es from V1 to V2: -- 1. Make my name consistent in "From" and "Signed-off-by" 2. Fix comment regarding scalable mode context entries 3. Add reviewed by tags Sai Praneeth Prakhya (3): iommu/vt-d: Modify the format of intel DMAR tables dump iommu/vt-d: Intro

[PATCH V2 2/3] iommu/vt-d: Introduce macros useful for dumping DMAR table

2019-05-10 Thread Sai Praneeth Prakhya
Cc: David Woodhouse Cc: Jacob Pan Cc: Andy Shevchenko Reviewed-by: Lu Baolu Reviewed-by: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/intel-pasid.c | 17 - drivers/iommu/intel-pasid.h | 26 ++ 2 files changed, 26 insertions

[PATCH 0/3] Add debugfs support to show scalable mode DMAR table

2019-05-09 Thread Sai Praneeth Prakhya
ff-by: Sai Praneeth Prakhya -- 2.7.4 ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[PATCH 1/3] iommu/vt-d: Modify the format of intel DMAR tables dump

2019-05-09 Thread Sai Praneeth Prakhya
Cc: Ashok Raj Cc: Lu Baolu Cc: Sohil Mehta Cc: David Woodhouse Cc: Jacob Pan Cc: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/intel-iommu-debugfs.c | 65 +++-- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/drivers/i

[PATCH 2/3] iommu/vt-d: Introduce macros useful for dumping DMAR table

2019-05-09 Thread Sai Praneeth Prakhya
Baolu Cc: Sohil Mehta Cc: David Woodhouse Cc: Jacob Pan Cc: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/intel-pasid.c | 17 - drivers/iommu/intel-pasid.h | 26 ++ 2 files changed, 26 insertions(+), 17 deletions(-) diff --git

[PATCH 3/3] iommu/vt-d: Add debugfs support to show scalable mode DMAR table internals

2019-05-09 Thread Sai Praneeth Prakhya
and hence in such cases PASID is defaulted to -1 indicating that PASID and it's related fields are invalid. Cc: Joerg Roedel Cc: Ashok Raj Cc: Lu Baolu Cc: Sohil Mehta Cc: David Woodhouse Cc: Jacob Pan Cc: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/intel-iommu-debu

[PATCH RFC 0/4] iommu: Add support to change default domain of a group

2019-07-02 Thread Sai Praneeth Prakhya
d from dma to identity. Only for x86_64 (i.e. intel_iommu/vt-d). Haven't tested for other architectures. Sai Praneeth Prakhya (4): iommu/vt-d: Modify device_def_domain_type() to use at runtime iommu: Add device_def_domain_type() call back function to iommu_ops iommu: Add support to change defa

[PATCH RFC 3/4] iommu: Add support to change default domain of a group

2019-07-02 Thread Sai Praneeth Prakhya
/ABI/testing/sysfs-kernel-iommu_groups" for more information. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/iommu.c | 178 ++

[PATCH RFC 4/4] iommu: Document usage of "/sys/kernel/iommu_groups//type" file

2019-07-02 Thread Sai Praneeth Prakhya
ohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- .../ABI/testing/sysfs-kernel-iommu_groups | 34 +++ 1 file changed, 34 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-kernel-iommu_groups b/Documentation/ABI/testing/sysfs-kernel-io

[PATCH RFC 1/4] iommu/vt-d: Modify device_def_domain_type() to use at runtime

2019-07-02 Thread Sai Praneeth Prakhya
Hence, use 'startup' argument to modify device_def_domain_type() such that command line argument settings apply only at boot time. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya

[PATCH RFC 2/4] iommu: Add device_def_domain_type() call back function to iommu_ops

2019-07-02 Thread Sai Praneeth Prakhya
semantics. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/intel-iommu.c | 9 ++--- include/linux/iommu.h | 3 +++ 2 files changed, 9 insertions

Re: [PATCH 4/4] iommu: Document usage of "/sys/kernel/iommu_groups//type" file

2019-08-21 Thread Sai Praneeth Prakhya
I don't know why people are being dropped randomly from CC'list. So, adding them back + Sohil, Jacob, Joerg, Baolu > > +What: /sys/kernel/iommu_groups//type > > +Date: August 2019 > > +KernelVersion: v5.4 > > +Contact: Sai Praneeth P

[PATCH 4/4] iommu: Document usage of "/sys/kernel/iommu_groups//type" file

2019-08-20 Thread Sai Praneeth Prakhya
ohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- .../ABI/testing/sysfs-kernel-iommu_groups | 35 +++ 1 file changed, 35 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-kernel-iommu_groups b/Documentation/ABI/testing/sysfs-kernel-io

[PATCH 1/4] iommu/vt-d: Modify device_def_domain_type() to use at runtime

2019-08-20 Thread Sai Praneeth Prakhya
gnored if the system is already up and running. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/intel-iommu.c | 35 +--

[PATCH 2/4] iommu: Add device_def_domain_type() call back function to iommu_ops

2019-08-20 Thread Sai Praneeth Prakhya
semantics. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/intel-iommu.c | 9 ++--- include/linux/iommu.h | 4 2 files changed, 10

[PATCH 3/4] iommu: Add support to change default domain of an iommu_group

2019-08-20 Thread Sai Praneeth Prakhya
sysfs-kernel-iommu_groups" for more information. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/iommu.c | 232 +

[PATCH 0/4] iommu: Add support to change default domain of a group

2019-08-20 Thread Sai Praneeth Prakhya
tested on other architectures. Sai Praneeth Prakhya (4): iommu/vt-d: Modify device_def_domain_type() to use at runtime iommu: Add device_def_domain_type() call back function to iommu_ops iommu: Add support to change default domain of an iommu_group iommu: Document usage of "/

[PATCH] iommu/vt-d: Print pasid table entries MSB to LSB in debugfs

2019-07-21 Thread Sai Praneeth Prakhya
first. Cc: Joerg Roedel Cc: Lu Baolu Cc: Sohil Mehta Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/intel-iommu-debugfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/intel-iommu-debugfs.c b/drivers/iommu/intel-iommu-debug

[PATCH V2 5/5] iommu: Document usage of "/sys/kernel/iommu_groups//type" file

2020-02-16 Thread Sai Praneeth Prakhya
Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- .../ABI/testing/sysfs-kernel-iommu_groups | 29 ++ 1 file changed, 29 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-kernel-iommu_groups b/Documentation/ABI/testing/sysfs-kernel-iommu_gr

[PATCH V2 2/5] iommu/vt-d: Rename device_def_domain_type() to intel_iommu_dev_def_domain_type()

2020-02-16 Thread Sai Praneeth Prakhya
so that it follows the same semantics. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/intel-iommu.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) d

[PATCH V2 1/5] iommu: Add dev_def_domain_type() call back function to iommu_ops

2020-02-16 Thread Sai Praneeth Prakhya
back function that could be implemented per architecture that performs the above check. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- include/linux/iommu.h | 3 +++ 1

[PATCH V2 0/5] iommu: Add support to change default domain of a group

2020-02-16 Thread Sai Praneeth Prakhya
/iommu/iommu.c | 229 - include/linux/iommu.h | 3 + 4 files changed, 265 insertions(+), 4 deletions(-) Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil M

[PATCH V2 3/5] iommu: Add support to change default domain of an iommu_group

2020-02-16 Thread Sai Praneeth Prakhya
/ABI/testing/sysfs-kernel-iommu_groups" for more information. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/iommu.c | 227

[PATCH V2 4/5] iommu: Take lock before reading iommu_group default domain type

2020-02-16 Thread Sai Praneeth Prakhya
-by: Sai Praneeth Prakhya --- drivers/iommu/iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 56a29076871f..10e14cb9c32b 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -424,6 +424,7 @@ static ssize_t

[PATCH] iommu: Remove functions that support private domain

2020-05-13 Thread Sai Praneeth Prakhya
dce8d6964ebd ("iommu/amd: Convert to probe/release_device() call-backs") [2] commit e5d1841f18b2 ("iommu/vt-d: Convert to probe/release_device() call-backs") [3] commit 327d5b2fee91 ("iommu/vt-d: Allow 32bit devices to uses DMA domain") Cc: Joerg Roedel Cc: Lu Baol

[PATCH V3 3/3] iommu: Document usage of "/sys/kernel/iommu_groups//type" file

2020-05-28 Thread Sai Praneeth Prakhya
Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- .../ABI/testing/sysfs-kernel-iommu_groups | 30 +++ 1 file changed, 30 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-kernel-iommu_groups b/Documentation/ABI/testing/sysfs-kernel-iommu_gr

[PATCH V3 0/3] iommu: Add support to change default domain of an iommu

2020-05-28 Thread Sai Praneeth Prakhya
ernel selects one among identity or dma mode. 2. Use "system_state" in device_def_domain_type() instead of an argument. Sai Praneeth Prakhya (3): iommu: Add support to change default domain of an iommu_group iommu: Take lock before reading iommu_group default domain type iommu: Documen

[PATCH V3 1/3] iommu: Add support to change default domain of an iommu_group

2020-05-28 Thread Sai Praneeth Prakhya
Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/iommu.c | 211 +- 1 file changed, 210 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/iommu.c

[PATCH V3 2/3] iommu: Take lock before reading iommu_group default domain type

2020-05-28 Thread Sai Praneeth Prakhya
w_type() doesn't try to derefernce stale pointers. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dri

[PATCH V4 3/3] iommu: Document usage of "/sys/kernel/iommu_groups//type" file

2020-06-04 Thread Sai Praneeth Prakhya
Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- .../ABI/testing/sysfs-kernel-iommu_groups | 30 +++ 1 file changed, 30 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-kernel-iommu_groups b/Documentation/ABI/testing/sysfs-kernel-iommu_gr

[PATCH V4 1/3] iommu: Add support to change default domain of an iommu group

2020-06-04 Thread Sai Praneeth Prakhya
roups" for more information. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/iommu.c | 215 +- 1 file changed,

[PATCH V4 2/3] iommu: Take lock before reading iommu group default domain type

2020-06-04 Thread Sai Praneeth Prakhya
w_type() doesn't try to derefernce stale pointers. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/iommu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dri

[PATCH V4 0/3] iommu: Add support to change default domain of an iommu group

2020-06-04 Thread Sai Praneeth Prakhya
rt for "auto" type, so that kernel selects one among identity or dma mode. 2. Use "system_state" in device_def_domain_type() instead of an argument. Sai Praneeth Prakhya (3): iommu: Add support to change default domain of an iommu_group iommu: Take lock before readi

[PATCH V5 0/3] iommu: Add support to change default domain of an iommu group

2020-07-24 Thread Sai Praneeth Prakhya
) to dev_def_domain_type() 8. Remove example from documentation 9. Change the value written to file "/sys/kernel/iommu_groups//type" from "dma" to "DMA". Changes from RFC: - 1. Added support for "auto" type, so that kernel selects one among

[PATCH V5 1/3] iommu: Add support to change default domain of an iommu group

2020-07-24 Thread Sai Praneeth Prakhya
roups" for more information. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Reviewed-by: Lu Baolu Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/iommu.c | 225 +-

[PATCH V5 3/3] iommu: Document usage of "/sys/kernel/iommu_groups//type" file

2020-07-24 Thread Sai Praneeth Prakhya
Mehta Cc: Robin Murphy Cc: Jacob Pan Reviewed-by: Lu Baolu Signed-off-by: Sai Praneeth Prakhya --- .../ABI/testing/sysfs-kernel-iommu_groups | 30 +++ 1 file changed, 30 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-kernel-iommu_groups b/Documentation/ABI/tes

[PATCH V5 2/3] iommu: Take lock before reading iommu group default domain type

2020-07-24 Thread Sai Praneeth Prakhya
w_type() doesn't try to derefernce stale pointers. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deacon Cc: Lu Baolu Cc: Sohil Mehta Cc: Robin Murphy Cc: Jacob Pan Reviewed-by: Lu Baolu Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/iommu.c | 2 ++ 1 file changed, 2 inser