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

2020-07-24 Thread Sai Praneeth Prakhya
Sohil 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/AB

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

2020-07-24 Thread Sai Praneeth Prakhya
oup_show_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 cha

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

2020-07-24 Thread Sai Praneeth Prakhya
el-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 Reviewed-by: Lu Baolu Signed-off-by: Sai Praneeth Prakhya --- drivers/iommu/iommu.c | 225 +

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

2020-07-24 Thread Sai Praneeth Prakhya
changes are in 2nd patch of V2. 7. Rename device_def_domain_type() 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 su

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

2020-06-04 Thread Sai Praneeth Prakhya
es from RFC: - 1. Added support 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 a

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

2020-06-04 Thread Sai Praneeth Prakhya
Sohil 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-iom

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

2020-06-04 Thread Sai Praneeth Prakhya
el-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 | 215 +- 1 file

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

2020-06-04 Thread Sai Praneeth Prakhya
oup_show_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(+) d

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

2020-05-28 Thread Sai Praneeth Prakhya
Sohil 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-iom

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

2020-05-28 Thread Sai Praneeth Prakhya
quot;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 reading iommu_group d

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

2020-05-28 Thread Sai Praneeth Prakhya
edel 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 | 211 +- 1 file changed, 210 insertions(+), 1 deletion(-) diff --git a/drivers/iom

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

2020-05-28 Thread Sai Praneeth Prakhya
oup_show_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(+) d

[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 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
: 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 V2 1/5] iommu: Add dev_def_domain_type() call back function to iommu_ops

2020-02-16 Thread Sai Praneeth Prakhya
call 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 +

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

2020-02-16 Thread Sai Praneeth Prakhya
| 8 +- drivers/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: L

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

2020-02-16 Thread Sai Praneeth Prakhya
hil Mehta 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-kerne

[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
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

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

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

2019-08-20 Thread Sai Praneeth Prakhya
olu Cc: Sohil 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

[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 1/4] iommu/vt-d: Modify device_def_domain_type() to use at runtime

2019-08-20 Thread Sai Praneeth Prakhya
ignored 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
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 | 9 ++--- include/linux/iommu.h | 4 2 files change

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

2019-08-20 Thread Sai Praneeth Prakhya
x27;t 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 &q

[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 RFC 2/4] iommu: Add device_def_domain_type() call back function to iommu_ops

2019-07-02 Thread Sai Praneeth Prakhya
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 | 9 ++--- include/linux/iommu.h | 3 +++ 2 files changed, 9 inser

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

2019-07-02 Thread Sai Praneeth Prakhya
rom 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
umentation/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
olu Cc: Sohil 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

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

2019-07-02 Thread Sai Praneeth Prakhya
arguments. 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:

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)) > > intel_

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 s

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 some

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

2019-05-24 Thread Sai Praneeth Prakhya
ID 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 Reviewed-by: Lu Baolu Reviewed-by: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya

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

2019-05-24 Thread Sai Praneeth Prakhya
g fault (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

[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
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.c | 6 +- drivers/iommu/intel-pasid.c | 17 - drivers/iommu/intel-pasid.h

[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
ID 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 Reviewed-by: Lu Baolu Reviewed-by: Andy Shevchenko Signed-off-by: Sai Praneeth Prakhya

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

2019-05-10 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-pasid.c | 17 - drivers/iommu/intel-pasid.h | 26 ++ 2 files changed, 26 inser

[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 3/3] iommu/vt-d: Add debugfs support to show scalable mode DMAR table internals

2019-05-09 Thread Sai Praneeth Prakhya
d 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-

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

2019-05-09 Thread Sai Praneeth Prakhya
c: Lu 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 --

[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 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