Re: [PATCH v2 06/11] iommu/arm-smmu-v3: Scan leaf TTD to sync hardware dirty log

2021-03-17 Thread Yi Sun
stion: shall we add PASID as one parameter to make iommu know which address space to visit? For live migration, the pasid should not be necessary. But considering future extension, it may be required. BRs, Yi Sun ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v2 04/11] iommu/arm-smmu-v3: Split block descriptor when start dirty log

2021-03-16 Thread Yi Sun
On 21-03-16 19:39:47, Keqian Zhu wrote: > Hi Yi, > > On 2021/3/16 17:17, Yi Sun wrote: > > On 21-03-10 17:06:07, Keqian Zhu wrote: > >> From: jiangkunkun > >> > >> Block descriptor is not a proper granule for dirty log tracking. > >> Take a

Re: [PATCH v2 04/11] iommu/arm-smmu-v3: Split block descriptor when start dirty log

2021-03-16 Thread Yi Sun
into one, e.g: int iommu_domain_set_hwdbm(struct iommu_domain *domain, bool enable, unsigned long iova, size_t size, int prot); Same comments to patch 5. BRs, Yi Sun > -- > 2.19.1 ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [RFC PATCH 10/11] vfio/iommu_type1: Optimize dirty bitmap population based on iommu HWDBM

2021-02-09 Thread Yi Sun
On 21-02-09 11:16:08, Robin Murphy wrote: > On 2021-02-07 09:56, Yi Sun wrote: > >Hi, > > > >On 21-01-28 23:17:41, Keqian Zhu wrote: > > > >[...] > > > >>+static void vfio_dma_dirty_log_start(struct vfio_iommu *iommu, > >>+

Re: [RFC PATCH 10/11] vfio/iommu_type1: Optimize dirty bitmap population based on iommu HWDBM

2021-02-09 Thread Yi Sun
On 21-02-07 18:40:36, Keqian Zhu wrote: > Hi Yi, > > On 2021/2/7 17:56, Yi Sun wrote: > > Hi, > > > > On 21-01-28 23:17:41, Keqian Zhu wrote: > > > > [...] > > > >> +static void vfio_dma_dirty_log_start(struct vfio_iommu *iommu, >

Re: [RFC PATCH 10/11] vfio/iommu_type1: Optimize dirty bitmap population based on iommu HWDBM

2021-02-07 Thread Yi Sun
Hi, On 21-01-28 23:17:41, Keqian Zhu wrote: [...] > +static void vfio_dma_dirty_log_start(struct vfio_iommu *iommu, > + struct vfio_dma *dma) > +{ > + struct vfio_domain *d; > + > + list_for_each_entry(d, &iommu->domain_list, next) { > + /* Go

[PATCH v2 1/2] iommu/vt-d: Fix sid not set issue in intel_svm_bind_gpasid()

2020-10-29 Thread Yi Sun
From: Liu Yi L Should get correct sid and set it into sdev. Because we execute 'sdev->sid != req->rid' in the loop of prq_event_thread(). Fixes: eb8d93ea3c1d ("iommu/vt-d: Report page request faults for guest SVA") Signed-off-by: Liu Yi L Signed-off-by: Yi Sun ---

[PATCH v2 2/2] iommu/vt-d: Fix a bug for PDP check in prq_event_thread

2020-10-29 Thread Yi Sun
From: "Liu, Yi L" In prq_event_thread(), the QI_PGRP_PDP is wrongly set by 'req->pasid_present' which should be replaced to 'req->priv_data_present'. Fixes: 5b438f4ba315 ("iommu/vt-d: Support page request in scalable mode") Signed-off-by: Liu, Y

[PATCH v2 0/2] iommu: Fix a few issues related to PRQ

2020-10-29 Thread Yi Sun
We found a few issues about PRQ. So, two patches are cooked to fix them. Please have a review. Thanks! Changes from v1: - Modify subject of patch 1 to make it more accurate. - Move get_domain_info() up to the sanity check part in patch 1. - Remove v1 patch 2 which is not suitable.

Re: [PATCH v1 2/3] iommu: Fix an issue in iommu_page_response() flags check

2020-10-28 Thread Yi Sun
On 20-10-28 10:13:56, Jean-Philippe Brucker wrote: > Hi, > > On Wed, Oct 28, 2020 at 09:36:57AM +0800, Yi Sun wrote: > > From: Jacob Pan > > > > original code fails when LAST_PAGE is set in flags. > > LAST_PAGE is not documented to be a valid flags for page

Re: [PATCH v1 3/3] iommu/vt-d: Fix a bug for PDP check in prq_event_thread

2020-10-27 Thread Yi Sun
On 20-10-28 13:05:05, Lu Baolu wrote: > Hi Yi, > > On 10/28/20 9:36 AM, Yi Sun wrote: > >From: "Liu, Yi L" > > Can you please add some description here? How far should this patch back > ported? A Fixes tag? > Sure. Will add description and Fixes tag. >

Re: [PATCH v1 1/3] iommu/vt-d: Fix prq reporting issues

2020-10-27 Thread Yi Sun
Thanks! Will do the modifications according to your comments in next version. On 20-10-28 12:50:37, Lu Baolu wrote: > Hi Yi, > > On 10/28/20 9:36 AM, Yi Sun wrote: > >From: Liu Yi L > > > >Should get correct sid and set it into sdev. Because we execute > >'

[PATCH v1 1/3] iommu/vt-d: Fix prq reporting issues

2020-10-27 Thread Yi Sun
From: Liu Yi L Should get correct sid and set it into sdev. Because we execute 'sdev->sid != req->rid' in the loop of prq_event_thread(). Signed-off-by: Liu Yi L Signed-off-by: Yi Sun --- drivers/iommu/intel/svm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dri

[PATCH v1 0/3] iommu: Fix a few issues related to PRQ

2020-10-27 Thread Yi Sun
We found a few issues about PRQ. So, three patches are cooked to fix them. Please have a review. Thanks! Jacob Pan (1): iommu: Fix an issue in iommu_page_response() flags check Liu Yi L (1): iommu/vt-d: Fix prq reporting issues Liu, Yi L (1): iommu/vt-d: Fix a bug for PDP check in prq_even

[PATCH v1 3/3] iommu/vt-d: Fix a bug for PDP check in prq_event_thread

2020-10-27 Thread Yi Sun
From: "Liu, Yi L" Signed-off-by: Liu, Yi L Signed-off-by: Yi Sun --- drivers/iommu/intel/svm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c index 75d9dc9..1870248 100644 --- a/drivers/iommu/intel/svm.c +++

[PATCH v1 2/3] iommu: Fix an issue in iommu_page_response() flags check

2020-10-27 Thread Yi Sun
From: Jacob Pan original code fails when LAST_PAGE is set in flags. Signed-off-by: Jacob Pan Signed-off-by: Liu Yi L Signed-off-by: Yi Sun --- drivers/iommu/iommu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index

Re: [RFC PATCH 0/5] iommu: APIs for paravirtual PASID allocation

2018-11-19 Thread Yi Sun
On 18-11-19 11:36:48, Konrad Rzeszutek Wilk wrote: > On Mon, Nov 12, 2018 at 02:44:56PM +0800, Lu Baolu wrote: > > This adds an uniformed API set for global PASIDs used by IOMMU > > and device drivers which depend on IOMMU. It works for drivers > > running on bare metal, full virtualized environmen