答复: [PATCH] vfio/pci: make the vfio_pci_mmap_fault reentrant

2021-03-10 Thread Zengtao (B)
Hi Alex: > -邮件原件- > 发件人: Alex Williamson [mailto:alex.william...@redhat.com] > 发送时间: 2021年3月10日 14:09 > 收件人: Jason Gunthorpe > 抄送: Peter Xu ; Zengtao (B) ; > Cornelia Huck ; Kevin Tian ; > Andrew Morton ; Giovanni Cabiddu > ; Michel Lespinasse ; Jann > Horn ; Max Gurtovoy ; > k...@vger.ke

Re: 答复: [PATCH] vfio/pci: make the vfio_pci_mmap_fault reentrant

2021-03-09 Thread Jason Gunthorpe
On Tue, Mar 09, 2021 at 03:49:09AM +, Zengtao (B) wrote: > Hi guys: > > Thanks for the helpful comments, after rethinking the issue, I have proposed > the following change: > 1. follow_pte instead of follow_pfn. Still no on follow_pfn, you don't need it once you use vmf_insert_pfn > 2. vmf

答复: [PATCH] vfio/pci: make the vfio_pci_mmap_fault reentrant

2021-03-08 Thread Zengtao (B)
Hi guys: Thanks for the helpful comments, after rethinking the issue, I have proposed the following change: 1. follow_pte instead of follow_pfn. 2. vmf_insert_pfn loops instead of io_remap_pfn_range 3. proper undos when some call fails. 4. keep the bigger lock range to avoid unessary pte install