RE: [PATCH v2 4/4] iommu/vt-d: Add page response ops support

2020-07-05 Thread Tian, Kevin
> From: Lu Baolu > Sent: Monday, July 6, 2020 8:26 AM > > After a page request is handled, software must response the device which > raised the page request with the handling result. This is done through 'response' is a noun. > the iommu ops.page_response if the request was reported to outside

RE: [PATCH v2 3/4] iommu/vt-d: Report page request faults for guest SVA

2020-07-05 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Monday, July 6, 2020 9:30 AM > > > From: Lu Baolu > > Sent: Monday, July 6, 2020 8:26 AM > > > > A pasid might be bound to a page table from a VM guest via the iommu > > ops.sva_bind_gpasid. In this case, when a DMA page fault is detected > > on the physical IOMMU, we

RE: [PATCH v2 3/4] iommu/vt-d: Report page request faults for guest SVA

2020-07-05 Thread Tian, Kevin
> From: Lu Baolu > Sent: Monday, July 6, 2020 8:26 AM > > A pasid might be bound to a page table from a VM guest via the iommu > ops.sva_bind_gpasid. In this case, when a DMA page fault is detected > on the physical IOMMU, we need to inject the page fault request into > the guest. After the

RE: [PATCH v2 2/4] iommu/vt-d: Add a helper to get svm and sdev for pasid

2020-07-05 Thread Tian, Kevin
> From: Lu Baolu > Sent: Monday, July 6, 2020 8:26 AM > > There are several places in the code that need to get the pointers of > svm and sdev according to a pasid and device. Add a helper to achieve > this for code consolidation and readability. > > Signed-off-by: Lu Baolu > --- >

RE: [PATCH v2 1/4] iommu/vt-d: Refactor device_to_iommu() helper

2020-07-05 Thread Tian, Kevin
> From: Lu Baolu > Sent: Monday, July 6, 2020 8:26 AM > > It is refactored in two ways: > > - Make it global so that it could be used in other files. > > - Make bus/devfn optional so that callers could ignore these two returned > values when they only want to get the coresponding iommu

[PATCH v2 2/4] iommu/vt-d: Add a helper to get svm and sdev for pasid

2020-07-05 Thread Lu Baolu
There are several places in the code that need to get the pointers of svm and sdev according to a pasid and device. Add a helper to achieve this for code consolidation and readability. Signed-off-by: Lu Baolu --- drivers/iommu/intel/svm.c | 121 +- 1 file

[PATCH v2 4/4] iommu/vt-d: Add page response ops support

2020-07-05 Thread Lu Baolu
After a page request is handled, software must response the device which raised the page request with the handling result. This is done through the iommu ops.page_response if the request was reported to outside of vendor iommu driver through iommu_report_device_fault(). This adds the VT-d

[PATCH v2 3/4] iommu/vt-d: Report page request faults for guest SVA

2020-07-05 Thread Lu Baolu
A pasid might be bound to a page table from a VM guest via the iommu ops.sva_bind_gpasid. In this case, when a DMA page fault is detected on the physical IOMMU, we need to inject the page fault request into the guest. After the guest completes handling the page fault, a page response need to be

[PATCH v2 1/4] iommu/vt-d: Refactor device_to_iommu() helper

2020-07-05 Thread Lu Baolu
It is refactored in two ways: - Make it global so that it could be used in other files. - Make bus/devfn optional so that callers could ignore these two returned values when they only want to get the coresponding iommu pointer. Signed-off-by: Lu Baolu --- drivers/iommu/intel/iommu.c | 55

[PATCH v2 0/4] iommu/vt-d: Add prq report and response support

2020-07-05 Thread Lu Baolu
Hi, This series adds page request event reporting and response support to the Intel IOMMU driver. This is necessary when the page requests must be processed by any component other than the vendor IOMMU driver. For example, when a guest page table was bound to a PASID through the

RE: [PATCH] iommu/arm-smmu-v3: allocate the memory of queues in local numa node

2020-07-05 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Will Deacon [mailto:w...@kernel.org] > Sent: Saturday, July 4, 2020 4:22 AM > To: Song Bao Hua (Barry Song) > Cc: h...@lst.de; m.szyprow...@samsung.com; robin.mur...@arm.com; > linux-arm-ker...@lists.infradead.org; iommu@lists.linux-foundation.org; >

RE: [PATCH] iommu/arm-smmu-v3: expose numa_node attribute to users in sysfs

2020-07-05 Thread Song Bao Hua (Barry Song)
> -Original Message- > From: Will Deacon [mailto:w...@kernel.org] > Sent: Saturday, July 4, 2020 4:22 AM > To: Song Bao Hua (Barry Song) > Cc: robin.mur...@arm.com; h...@lst.de; m.szyprow...@samsung.com; > iommu@lists.linux-foundation.org; linux-arm-ker...@lists.infradead.org; >