[PATCH 2/2] iommu/vt-d: tylersburg isoch identity map check is done too late.

2017-01-30 Thread Ashok Raj
.org Cc: sta...@vger.kernel.org Cc: Ashok Raj <ashok@intel.com> Fixes: 86080ccc22 ("iommu/vt-d: Allocate si_domain in init_dmars()") Signed-off-by: Ashok Raj <ashok@intel.com> Reported-by: Yunhong Jiang <yunhong.ji...@intel.com> --- drivers/iommu/intel-iommu.c | 3

[PATCH 1/2] iommu/vt-d: Fix some macros that are incorrectly specified in intel-iommu

2017-01-30 Thread Ashok Raj
oodhouse <dw...@infradead.org> Cc: iommu@lists.linux-foundation.org Cc: linux-ker...@vger.kernel.org Cc: sta...@vger.kernel.org Cc: CQ Tang <cq.t...@intel.com> Cc: Ashok Raj <ashok@intel.com> Fixes: 2f26e0a9 ("iommu/vt-d: Add basic SVM PASID support") Signed-off-by: CQ Tang

[PATCH 2/2] iommu/vt-d: tylersburg isoch identity map check is done too late.

2017-01-27 Thread Ashok Raj
.org Cc: sta...@vger.kernel.org Cc: Ashok Raj <ashok@intel.com> Signed-off-by: Ashok Raj <ashok@intel.com> Reported-by: Yunhong Jiang <yunhong.ji...@intel.com> --- drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel

[PATCH 1/2] iommu/vt-d: Fix some macros that are incorrectly specified in intel-iommu

2017-01-27 Thread Ashok Raj
oodhouse <dw...@infradead.org> Cc: iommu@lists.linux-foundation.org Cc: linux-ker...@vger.kernel.org Cc: sta...@vger.kernel.org Cc: CQ Tang <cq.t...@intel.com> Cc: Ashok Raj <ashok@intel.com> Signed-off-by: CQ Tang <cq.t...@intel.com> Signed-off-by: Ashok Raj <ashok.

[PATCH 2/2] iommu/vt-d: tylersburg isoch identity map check is done too late.

2017-01-26 Thread Ashok Raj
.org Cc: sta...@vger.kernel.org Cc: Ashok Raj <ashok@intel.com> Signed-off-by: Ashok Raj <ashok@intel.com> Reported-by: Yunhong Jiang <yunhong.ji...@intel.com> --- drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel

[PATCH 1/2] iommu/vt-d: Fix some macros that are incorrectly specified in intel-iommu

2017-01-26 Thread Ashok Raj
oodhouse <dw...@infradead.org> Cc: iommu@lists.linux-foundation.org Cc: linux-ker...@vger.kernel.org Cc: sta...@vger.kernel.org Cc: CQ Tang <cq.t...@intel.com> Cc: Ashok Raj <ashok@intel.com> Signed-off-by: CQ Tang <cq.t...@intel.com> Signed-off-by: Ashok Raj <ashok.

[PATCH] iommu/vt-d: Fix IOMMU lookup for VF's

2016-10-21 Thread Ashok Raj
;dw...@infradead.org> Cc: Joerg Roedel <j...@8bytes.org> Cc: Ashok Raj <ashok@intel.com> Cc: Sainath Grandhi <sainath.gran...@intel.com> Cc: iommu@lists.linux-foundation.org Cc: sta...@vger.kernel.org Signed-off-by: Sainath Grandhi <sainath.gran...@intel.com> Signed-off-by:

[PATCH 0/4] Patches to support ring0 SVM and devtlb

2017-08-08 Thread Ashok Raj
Hi Sorry for resending.. iommu list email was mistyped :-( The first 2 patches in the series fix some simple bugs in Intel vt-d driver. The 3rd patch Adds support for kmem notify required to support ring0 SVM. 4th patch uses the hooks to perform device tlb invalidations. Ashok Raj (3): iommu

[PATCH 1/4] iommu/vt-d: IOMMU Page Request needs to check if address is canonical.

2017-08-08 Thread Ashok Raj
ux-ker...@vger.kernel.org> Cc: iommu@lists.linux-foundation.org Cc: David Woodhouse <dw...@infradead.org> Cc: Jacob Pan <jacob.jun....@intel.com> Cc: Ashok Raj <ashok@intel.com> Signed-off-by: Ashok Raj <ashok@intel.com> Reported-by: Sudeep Dutt <sudeep.d...@intel.com&

[PATCH 2/4] iommu/vt-d: Avoid calling virt_to_phys() on null pointer

2017-08-08 Thread Ashok Raj
; Cc: Jacob Pan <jacob.jun....@intel.com> Cc: Ashok Raj <ashok@intel.com> Signed-off-by: Ashok Raj <ashok@intel.com> --- drivers/iommu/intel-iommu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iomm

[PATCH 3/4] mm: Add kernel MMU notifier to manage remote TLB

2017-08-08 Thread Ashok Raj
gister on the notifier chain to flush the device TLBs when necessary. To: linux-ker...@vger.kernel.org To: Joerg Roedel <j...@8bytes.org> Cc: Ashok Raj <ashok@intel.com> Cc: Dave Hansen <dave.han...@intel.com> Cc: CQ Tang <cq.t...@intel.com> Cc: Thomas Gleixner <t...@l

[PATCH 4/4] iommu/vt-d: Hooks to invalidate iotlb/devtlb when using supervisor PASID's.

2017-08-08 Thread Ashok Raj
mmu_notifier_register() api's. To: linux-ker...@vger.kernel.org To: Joerg Roedel <j...@8bytes.org> Cc: Ashok Raj <ashok@intel.com> Cc: Dave Hansen <dave.han...@intel.com> Cc: Huang Ying <ying.hu...@intel.com> Cc: CQ Tang <cq.t...@intel.com> Cc: Thomas Gleixner <t...@l

[PATCH 2/2] iommu/vt-d: Helper function to query if a pasid has any active users

2017-05-10 Thread Ashok Raj
bytes.org> To: linux-ker...@vger.kernel.org To: David Woodhouse <d...@infradead.org> Cc: Jean-Phillipe Brucker <jean-philippe.bruc...@arm.com> Cc: iommu@lists.linux-foundation.org Signed-off-by: CQ Tang <cq.t...@intel.com> Signed-off-by: Ashok Raj <ashok@intel.com>

[PATCH 2/2] iommu/vt-d: Helper function to query if a pasid has any active users

2017-05-10 Thread Ashok Raj
bytes.org> To: linux-ker...@vger.kernel.org To: David Woodhouse <dw...@infradead.org> Cc: Jean-Phillipe Brucker <jean-philippe.bruc...@arm.com> Cc: iommu@lists.linux-foundation.org Signed-off-by: CQ Tang <cq.t...@intel.com> Signed-off-by: Ashok Raj <ashok@intel.com>

[PATCH 1/2] PCI: Save properties required to handle FLR for replay purposes.

2017-05-10 Thread Ashok Raj
.org> Cc: iommu@lists.linux-foundation.org Signed-off-by: CQ Tang <cq.t...@intel.com> Signed-off-by: Ashok Raj <ashok@intel.com> --- drivers/pci/ats.c | 65 + drivers/pci/pci.c | 3 +++ include/linux/pci-ats.h | 10

[PATCH 2/2] PCI: Save properties required to handle FLR for replay purposes.

2017-05-30 Thread Ashok Raj
..@vger.kernel.org To: linux-ker...@vger.kernel.org Cc: Jean-Phillipe Brucker <jean-philippe.bruc...@arm.com> Cc: David Woodhouse <dw...@infradead.org> Cc: iommu@lists.linux-foundation.org Signed-off-by: CQ Tang <cq.t...@intel.com> Signed-off-by: Ashok Raj <ashok@intel

[PATCH 0/2] Save and restore pci properties to support FLR

2017-05-30 Thread Ashok Raj
Resending Jean's patch so it can be included earlier than his large SVM commits. Original patch https://patchwork.kernel.org/patch/9593891 was ack'ed by Bjorn. Let's commit these separately since we need functionality earlier. Resending this series as requested by Jean. CQ Tang (1): PCI: Save

[PATCH] vfio/pci: Some buggy virtual functions incorrectly report 1 for intx.

2018-08-09 Thread Ashok Raj
suggestions from Alex https://lkml.org/lkml/2018/7/16/1052 Reported-by: Gage Eads Tested-by: Gage Eads Signed-off-by: Ashok Raj Cc: k...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: iommu@lists.linux-foundation.org Cc: Joerg Roedel Cc: Bjorn Helgaas Cc: Gage Eads --- drivers/vfio/pci

[PATCH] x86/pci: Some buggy virtual functions incorrectly report 1 for intx.

2018-07-16 Thread Ashok Raj
PCI_INTERRUPT_PIN should always read 0 for SRIOV Virtual Functions. Some SRIOV devices have some bugs in RTL and VF's end up reading 1 instead of 0 for the PIN. We could enforce it by default in vfio_pci_nointx. Reported-by: Gage Eads Tested-by: Gage Eads Signed-off-by: Ashok Raj Cc: linux

[PATCH] iommu: Relax ACS requirement for RCiEP devices.

2020-05-04 Thread Ashok Raj
ntegrated Endpoint, MSI 00 This permits assigning this device to a guest VM. Fixes: f096c061f552 ("iommu: Rework iommu_group_get_for_pci_dev()") Signed-off-by: Ashok Raj To: Joerg Roedel To: Bjorn Helgaas Cc: linux-ker...@vger.kernel.org Cc: iommu@lists.linux-foundation.org Cc: Lu Baolu

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

2020-09-25 Thread Ashok Raj
Presently, the default domain of an iommu group is allocated during boot time and it cannot be changed later. So, the device would typically be either in identity (pass_through) mode or the device would be in DMA mode as long as the system is up and running. There is no way to change the default

[Patch V8 3/3] iommu: Document usage of "/sys/kernel/iommu_groups//type" file

2020-09-25 Thread Ashok Raj
From: Sai Praneeth Prakhya The default domain type of an iommu group can be changed by writing to "/sys/kernel/iommu_groups//type" file. Hence, document it's usage and more importantly spell out its limitations. Cc: Christoph Hellwig Cc: Joerg Roedel Cc: Ashok Raj Cc: Will Deac

[Patch V8 2/3] iommu: Take lock before reading iommu group default domain type

2020-09-25 Thread Ashok Raj
n't see stale values or iommu_group_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 +

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

2020-09-25 Thread Ashok Raj
ng/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 Reviewed-by: Lu Baolu Signed-off-by: Sai Praneeth Prakhya --- drivers

[PATCH 1/1] pci: pciehp: Handle MRL interrupts to enable slot for hotplug.

2020-09-25 Thread Ashok Raj
. - If there is ATTN button, and an MRL event pending, ignore Presence Detect. Since we want ATTN button to drive the hotplug event. Signed-off-by: Ashok Raj Co-developed-by: Kuppuswamy Sathyanarayanan --- drivers/pci/hotplug/pciehp.h | 1 + drivers/pci/hotplug/pciehp_ctrl.c | 69

[PATCH] PCI: Relax ACS requirement for Intel RCiEP devices.

2020-05-28 Thread Ashok Raj
3 Network controller: Intel Corporation Device 9df0 (rev 30) Capabilities: [40] Express (v2) Root Complex Integrated Endpoint, MSI 00 This permits assigning this device to a guest VM. Fixes: f096c061f552 ("iommu: Rework iommu_group_get_for_pci_dev()") Signed-off-by: Ashok Raj To: Joer

[PATCH] iommu: Relax ACS requirement for Intel RCiEP devices.

2020-05-26 Thread Ashok Raj
3 Network controller: Intel Corporation Device 9df0 (rev 30) Capabilities: [40] Express (v2) Root Complex Integrated Endpoint, MSI 00 This permits assigning this device to a guest VM. Fixes: f096c061f552 ("iommu: Rework iommu_group_get_for_pci_dev()") Signed-off-by: Ashok Raj To: Joer

[PATCH] PCI/ATS: PASID and PRI are only enumerated in PF devices.

2020-07-21 Thread Ashok Raj
To: Lu Baolu Cc: sta...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: Ashok Raj Cc: iommu@lists.linux-foundation.org --- drivers/iommu/intel/iommu.c | 2 +- drivers/pci/ats.c | 13 + include/linux/pci-ats.h | 4 3 files changed, 18

[PATCH] PCI/ATS: PASID and PRI are only enumerated in PF devices.

2020-07-21 Thread Ashok Raj
...@vger.kernel.org Cc: Ashok Raj Cc: iommu@lists.linux-foundation.org --- drivers/iommu/intel/iommu.c | 2 +- drivers/pci/ats.c | 14 ++ include/linux/pci-ats.h | 4 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers

[PATCH v3 1/1] PCI/ATS: Check PRI supported on the PF device when SRIOV is enabled

2020-07-23 Thread Ashok Raj
("iommu/vt-d: Always enable PASID/PRI PCI capabilities before ATS") Signed-off-by: Ashok Raj To: Bjorn Helgaas To: Joerg Roedel To: Lu Baolu Cc: sta...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: Ashok Raj Cc: iommu@lists.linux-foundation.org ---

[PATCH] PCI/ATS: PASID and PRI are only enumerated in PF devices.

2020-07-20 Thread Ashok Raj
Raj To: Bjorn Helgaas To: Joerg Roedel To: Lu Baolu Cc: sta...@vger.kernel.org Cc: linux-...@vger.kernel.org Cc: linux-ker...@vger.kernel.org Cc: Ashok Raj Cc: iommu@lists.linux-foundation.org --- drivers/iommu/intel/iommu.c | 2 +- drivers/pci/ats.c | 14 ++ include