Re: [PATCH v3 2/2] vfio/iommu_type1: Fix some sanity checks in detach group

2021-01-28 Thread Keqian Zhu
On 2021/1/28 7:46, Alex Williamson wrote: > On Fri, 22 Jan 2021 17:26:35 +0800 > Keqian Zhu wrote: > >> vfio_sanity_check_pfn_list() is used to check whether pfn_list and >> notifier are empty when remove the external domain, so it makes a >> wrong assumption that only external domain will

Re: [PATCH v3 2/2] vfio/iommu_type1: Fix some sanity checks in detach group

2021-01-28 Thread Keqian Zhu
On 2021/1/28 7:46, Alex Williamson wrote: > On Fri, 22 Jan 2021 17:26:35 +0800 > Keqian Zhu wrote: > >> vfio_sanity_check_pfn_list() is used to check whether pfn_list and >> notifier are empty when remove the external domain, so it makes a >> wrong assumption that only external domain will

Re: [PATCH v3 2/2] vfio/iommu_type1: Fix some sanity checks in detach group

2021-01-27 Thread Alex Williamson
On Fri, 22 Jan 2021 17:26:35 +0800 Keqian Zhu wrote: > vfio_sanity_check_pfn_list() is used to check whether pfn_list and > notifier are empty when remove the external domain, so it makes a > wrong assumption that only external domain will use the pinning > interface. > > Now we apply the

[PATCH v3 2/2] vfio/iommu_type1: Fix some sanity checks in detach group

2021-01-22 Thread Keqian Zhu
vfio_sanity_check_pfn_list() is used to check whether pfn_list and notifier are empty when remove the external domain, so it makes a wrong assumption that only external domain will use the pinning interface. Now we apply the pfn_list check when a vfio_dma is removed and apply the notifier check