RE: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-10 Thread Tian, Kevin
> From: Joao Martins > Sent: Tuesday, May 10, 2022 7:51 PM > > On 5/10/22 02:38, Tian, Kevin wrote: > >> From: Jason Gunthorpe > >> Sent: Friday, May 6, 2022 7:46 PM > >> > >> On Fri, May 06, 2022 at 03:51:40AM +, Tian, Kevin wrote: > From: Jason Gunthorpe > Sent: Thursday, May 5,

RE: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-10 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Tuesday, May 10, 2022 9:47 PM > > On Tue, May 10, 2022 at 01:38:26AM +, Tian, Kevin wrote: > > > > However, tt costs nothing to have dirty tracking as long as all iommus > > > support it in the system - which seems to be the normal case today. > > > > > > We s

Re: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-10 Thread Jason Gunthorpe via iommu
On Tue, May 10, 2022 at 01:38:26AM +, Tian, Kevin wrote: > > However, tt costs nothing to have dirty tracking as long as all iommus > > support it in the system - which seems to be the normal case today. > > > > We should just always turn it on at this point. > > Then still need a way to rep

Re: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-10 Thread Joao Martins
On 5/10/22 02:38, Tian, Kevin wrote: >> From: Jason Gunthorpe >> Sent: Friday, May 6, 2022 7:46 PM >> >> On Fri, May 06, 2022 at 03:51:40AM +, Tian, Kevin wrote: From: Jason Gunthorpe Sent: Thursday, May 5, 2022 10:08 PM On Thu, May 05, 2022 at 07:40:37AM +, Tian, Kevi

RE: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-09 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Friday, May 6, 2022 7:46 PM > > On Fri, May 06, 2022 at 03:51:40AM +, Tian, Kevin wrote: > > > From: Jason Gunthorpe > > > Sent: Thursday, May 5, 2022 10:08 PM > > > > > > On Thu, May 05, 2022 at 07:40:37AM +, Tian, Kevin wrote: > > > > > > > In concept th

Re: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-06 Thread Jason Gunthorpe via iommu
On Fri, May 06, 2022 at 03:51:40AM +, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Thursday, May 5, 2022 10:08 PM > > > > On Thu, May 05, 2022 at 07:40:37AM +, Tian, Kevin wrote: > > > > > In concept this is an iommu property instead of a domain property. > > > > Not really, d

RE: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-05 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, May 5, 2022 10:08 PM > > On Thu, May 05, 2022 at 07:40:37AM +, Tian, Kevin wrote: > > > In concept this is an iommu property instead of a domain property. > > Not really, domains shouldn't be changing behaviors once they are > created. If a domain s

RE: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-05 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, May 5, 2022 9:55 PM > > On Thu, May 05, 2022 at 11:03:18AM +, Tian, Kevin wrote: > > > iiuc the purpose of 'write-protection' here is to capture in-fly dirty pages > > in the said race window until unmap and iotlb is invalidated is completed. > > No

RE: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-05 Thread Tian, Kevin
> From: Joao Martins > Sent: Thursday, May 5, 2022 7:51 PM > > On 5/5/22 12:03, Tian, Kevin wrote: > >> From: Joao Martins > >> Sent: Thursday, May 5, 2022 6:07 PM > >> > >> On 5/5/22 08:42, Tian, Kevin wrote: > From: Jason Gunthorpe > Sent: Tuesday, May 3, 2022 2:53 AM > >

Re: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-05 Thread Jason Gunthorpe via iommu
On Thu, May 05, 2022 at 07:40:37AM +, Tian, Kevin wrote: > In concept this is an iommu property instead of a domain property. Not really, domains shouldn't be changing behaviors once they are created. If a domain supports dirty tracking and I attach a new device then it still must support di

Re: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-05 Thread Jason Gunthorpe via iommu
On Thu, May 05, 2022 at 11:03:18AM +, Tian, Kevin wrote: > iiuc the purpose of 'write-protection' here is to capture in-fly dirty pages > in the said race window until unmap and iotlb is invalidated is completed. No, the purpose is to perform "unmap" without destroying the dirty bit in the pr

Re: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-05 Thread Joao Martins
On 5/5/22 12:03, Tian, Kevin wrote: >> From: Joao Martins >> Sent: Thursday, May 5, 2022 6:07 PM >> >> On 5/5/22 08:42, Tian, Kevin wrote: From: Jason Gunthorpe Sent: Tuesday, May 3, 2022 2:53 AM On Mon, May 02, 2022 at 12:11:07PM -0600, Alex Williamson wrote: > On Fri, 29

RE: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-05 Thread Tian, Kevin
> From: Joao Martins > Sent: Thursday, May 5, 2022 6:07 PM > > On 5/5/22 08:42, Tian, Kevin wrote: > >> From: Jason Gunthorpe > >> Sent: Tuesday, May 3, 2022 2:53 AM > >> > >> On Mon, May 02, 2022 at 12:11:07PM -0600, Alex Williamson wrote: > >>> On Fri, 29 Apr 2022 05:45:20 + > >>> "Tian, K

Re: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-05 Thread Joao Martins
On 5/5/22 08:42, Tian, Kevin wrote: >> From: Jason Gunthorpe >> Sent: Tuesday, May 3, 2022 2:53 AM >> >> On Mon, May 02, 2022 at 12:11:07PM -0600, Alex Williamson wrote: >>> On Fri, 29 Apr 2022 05:45:20 + >>> "Tian, Kevin" wrote: > From: Joao Martins > 3) Unmapping an IOVA range whi

RE: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-05 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Tuesday, May 3, 2022 2:53 AM > > On Mon, May 02, 2022 at 12:11:07PM -0600, Alex Williamson wrote: > > On Fri, 29 Apr 2022 05:45:20 + > > "Tian, Kevin" wrote: > > > > From: Joao Martins > > > > 3) Unmapping an IOVA range while returning its dirty bit prior to

RE: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-05 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Friday, April 29, 2022 8:39 PM > > > >> * There's no capabilities API in IOMMUFD, and in this RFC each vendor > tracks > > > > > > there was discussion adding device capability uAPI somewhere. > > > > > ack let me know if there was snippets to the conversation as I

Re: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-03 Thread Joao Martins
On 5/2/22 19:52, Jason Gunthorpe wrote: > On Mon, May 02, 2022 at 12:11:07PM -0600, Alex Williamson wrote: >> On Fri, 29 Apr 2022 05:45:20 + >> "Tian, Kevin" wrote: From: Joao Martins 3) Unmapping an IOVA range while returning its dirty bit prior to unmap. This case is specifi

Re: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-02 Thread Jason Gunthorpe via iommu
On Mon, May 02, 2022 at 12:11:07PM -0600, Alex Williamson wrote: > On Fri, 29 Apr 2022 05:45:20 + > "Tian, Kevin" wrote: > > > From: Joao Martins > > > 3) Unmapping an IOVA range while returning its dirty bit prior to > > > unmap. This case is specific for non-nested vIOMMU case where an > >

Re: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-05-02 Thread Alex Williamson
On Fri, 29 Apr 2022 05:45:20 + "Tian, Kevin" wrote: > > From: Joao Martins > > 3) Unmapping an IOVA range while returning its dirty bit prior to > > unmap. This case is specific for non-nested vIOMMU case where an > > erronous guest (or device) DMAing to an address being unmapped at the > >

Re: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-04-29 Thread Joao Martins
On 4/29/22 13:38, Jason Gunthorpe wrote: > On Fri, Apr 29, 2022 at 11:27:58AM +0100, Joao Martins wrote: 3) Unmapping an IOVA range while returning its dirty bit prior to unmap. This case is specific for non-nested vIOMMU case where an erronous guest (or device) DMAing to an address

Re: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-04-29 Thread Jason Gunthorpe via iommu
On Fri, Apr 29, 2022 at 11:27:58AM +0100, Joao Martins wrote: > >> 3) Unmapping an IOVA range while returning its dirty bit prior to > >> unmap. This case is specific for non-nested vIOMMU case where an > >> erronous guest (or device) DMAing to an address being unmapped at the > >> same time. > >

Re: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-04-29 Thread Joao Martins
On 4/29/22 06:45, Tian, Kevin wrote: >> From: Joao Martins >> Sent: Friday, April 29, 2022 5:09 AM >> >> Presented herewith is a series that extends IOMMUFD to have IOMMU >> hardware support for dirty bit in the IOPTEs. >> >> Today, AMD Milan (which been out for a year now) supports it while ARM >

RE: [PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-04-28 Thread Tian, Kevin
> From: Joao Martins > Sent: Friday, April 29, 2022 5:09 AM > > Presented herewith is a series that extends IOMMUFD to have IOMMU > hardware support for dirty bit in the IOPTEs. > > Today, AMD Milan (which been out for a year now) supports it while ARM > SMMUv3.2+ alongside VT-D rev3.x are expec

[PATCH RFC 00/19] IOMMUFD Dirty Tracking

2022-04-28 Thread Joao Martins
Presented herewith is a series that extends IOMMUFD to have IOMMU hardware support for dirty bit in the IOPTEs. Today, AMD Milan (which been out for a year now) supports it while ARM SMMUv3.2+ alongside VT-D rev3.x are expected to eventually come along. The intended use-case is to support Live Mig