Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-24 Thread Jason Wang
On 2019/9/24 上午10:02, Tian, Kevin wrote: From: Jason Wang [mailto:jasow...@redhat.com] Sent: Friday, September 20, 2019 9:19 AM On 2019/9/20 上午6:54, Tian, Kevin wrote: From: Paolo Bonzini [mailto:pbonz...@redhat.com] Sent: Thursday, September 19, 2019 7:14 PM On 19/09/19 09:16, Tian, Kevin

RE: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-23 Thread Tian, Kevin
> From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Friday, September 20, 2019 9:19 AM > > On 2019/9/20 上午6:54, Tian, Kevin wrote: > >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > >> Sent: Thursday, September 19, 2019 7:14 PM > >> > >> On 19/09/19 09:16, Tian, Kevin wrote: > > why

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-20 Thread Michael S. Tsirkin
On Fri, Sep 20, 2019 at 09:15:40AM +0800, Jason Wang wrote: > > On 2019/9/19 下午10:06, Michael S. Tsirkin wrote: > > On Thu, Sep 19, 2019 at 05:37:48PM +0800, Jason Wang wrote: > > > On 2019/9/19 下午3:16, Tian, Kevin wrote: > > > > +Paolo to help clarify here. > > > > > > > > > From: Jason Wang

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Jason Wang
On 2019/9/19 下午10:06, Michael S. Tsirkin wrote: On Thu, Sep 19, 2019 at 05:37:48PM +0800, Jason Wang wrote: On 2019/9/19 下午3:16, Tian, Kevin wrote: +Paolo to help clarify here. From: Jason Wang [mailto:jasow...@redhat.com] Sent: Thursday, September 19, 2019 2:32 PM On 2019/9/19 下午2:17,

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Jason Wang
On 2019/9/20 上午6:54, Tian, Kevin wrote: From: Paolo Bonzini [mailto:pbonz...@redhat.com] Sent: Thursday, September 19, 2019 7:14 PM On 19/09/19 09:16, Tian, Kevin wrote: why GPA1 and GPA2 should be both dirty? even they have the same HVA due to overlaping virtual address space in two

RE: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Tian, Kevin
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > Sent: Thursday, September 19, 2019 7:14 PM > > On 19/09/19 09:16, Tian, Kevin wrote: > >>> why GPA1 and GPA2 should be both dirty? > >>> even they have the same HVA due to overlaping virtual address space > in > >>> two processes, they still

RE: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Friday, September 20, 2019 1:21 AM > > On Wed, 18 Sep 2019 07:21:05 + > "Tian, Kevin" wrote: > > > > From: Jason Wang [mailto:jasow...@redhat.com] > > > Sent: Wednesday, September 18, 2019 2:04 PM > > > > > > On 2019/9/18

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Alex Williamson
On Wed, 18 Sep 2019 07:21:05 + "Tian, Kevin" wrote: > > From: Jason Wang [mailto:jasow...@redhat.com] > > Sent: Wednesday, September 18, 2019 2:04 PM > > > > On 2019/9/18 上午9:31, Tian, Kevin wrote: > > >> From: Alex Williamson [mailto:alex.william...@redhat.com] > > >> Sent: Tuesday,

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Michael S. Tsirkin
On Thu, Sep 19, 2019 at 05:37:48PM +0800, Jason Wang wrote: > > On 2019/9/19 下午3:16, Tian, Kevin wrote: > > +Paolo to help clarify here. > > > > > From: Jason Wang [mailto:jasow...@redhat.com] > > > Sent: Thursday, September 19, 2019 2:32 PM > > > > > > > > > On 2019/9/19 下午2:17, Yan Zhao

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Jason Wang
On 2019/9/19 下午7:14, Paolo Bonzini wrote: On 19/09/19 09:16, Tian, Kevin wrote: why GPA1 and GPA2 should be both dirty? even they have the same HVA due to overlaping virtual address space in two processes, they still correspond to two physical pages. don't get what's your meaning :) The

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Paolo Bonzini
On 19/09/19 14:39, Jason Wang wrote: >> In general, userspace cannot assume that it's okay to sync just through >> GPA1.  It must sync the host page if *either* GPA1 or GPA2 are marked >> dirty. > > Maybe we need document this somewhere. Well, it's implicit but it should be kind of obvious. The

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Jason Wang
On 2019/9/19 下午6:16, Yan Zhao wrote: On Thu, Sep 19, 2019 at 06:06:52PM +0800, Jason Wang wrote: On 2019/9/19 下午2:29, Yan Zhao wrote: On Thu, Sep 19, 2019 at 02:32:03PM +0800, Jason Wang wrote: On 2019/9/19 下午2:17, Yan Zhao wrote: On Thu, Sep 19, 2019 at 02:09:53PM +0800, Jason Wang wrote:

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Paolo Bonzini
On 19/09/19 09:16, Tian, Kevin wrote: >>> why GPA1 and GPA2 should be both dirty? >>> even they have the same HVA due to overlaping virtual address space in >>> two processes, they still correspond to two physical pages. >>> don't get what's your meaning :) >> >> The point is not leave any corner

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Yan Zhao
On Thu, Sep 19, 2019 at 06:06:52PM +0800, Jason Wang wrote: > > On 2019/9/19 下午2:29, Yan Zhao wrote: > > On Thu, Sep 19, 2019 at 02:32:03PM +0800, Jason Wang wrote: > >> On 2019/9/19 下午2:17, Yan Zhao wrote: > >>> On Thu, Sep 19, 2019 at 02:09:53PM +0800, Jason Wang wrote: > On 2019/9/19

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Jason Wang
On 2019/9/19 下午5:36, Yan Zhao wrote: On Thu, Sep 19, 2019 at 05:35:05PM +0800, Jason Wang wrote: On 2019/9/19 下午2:32, Yan Zhao wrote: On Thu, Sep 19, 2019 at 02:29:54PM +0800, Yan Zhao wrote: On Thu, Sep 19, 2019 at 02:32:03PM +0800, Jason Wang wrote: On 2019/9/19 下午2:17, Yan Zhao wrote:

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Jason Wang
On 2019/9/19 下午2:29, Yan Zhao wrote: On Thu, Sep 19, 2019 at 02:32:03PM +0800, Jason Wang wrote: On 2019/9/19 下午2:17, Yan Zhao wrote: On Thu, Sep 19, 2019 at 02:09:53PM +0800, Jason Wang wrote: On 2019/9/19 下午1:28, Yan Zhao wrote: On Thu, Sep 19, 2019 at 09:05:12AM +0800, Jason Wang wrote:

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Yan Zhao
On Thu, Sep 19, 2019 at 05:35:05PM +0800, Jason Wang wrote: > > On 2019/9/19 下午2:32, Yan Zhao wrote: > > On Thu, Sep 19, 2019 at 02:29:54PM +0800, Yan Zhao wrote: > >> On Thu, Sep 19, 2019 at 02:32:03PM +0800, Jason Wang wrote: > >>> On 2019/9/19 下午2:17, Yan Zhao wrote: > On Thu, Sep 19,

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Jason Wang
On 2019/9/19 下午3:16, Tian, Kevin wrote: +Paolo to help clarify here. From: Jason Wang [mailto:jasow...@redhat.com] Sent: Thursday, September 19, 2019 2:32 PM On 2019/9/19 下午2:17, Yan Zhao wrote: On Thu, Sep 19, 2019 at 02:09:53PM +0800, Jason Wang wrote: On 2019/9/19 下午1:28, Yan Zhao

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Jason Wang
On 2019/9/19 下午2:32, Yan Zhao wrote: On Thu, Sep 19, 2019 at 02:29:54PM +0800, Yan Zhao wrote: On Thu, Sep 19, 2019 at 02:32:03PM +0800, Jason Wang wrote: On 2019/9/19 下午2:17, Yan Zhao wrote: On Thu, Sep 19, 2019 at 02:09:53PM +0800, Jason Wang wrote: On 2019/9/19 下午1:28, Yan Zhao wrote:

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Tian, Kevin
+Paolo to help clarify here. > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Thursday, September 19, 2019 2:32 PM > > > On 2019/9/19 下午2:17, Yan Zhao wrote: > > On Thu, Sep 19, 2019 at 02:09:53PM +0800, Jason Wang wrote: > >> On 2019/9/19 下午1:28, Yan Zhao wrote: > >>> On Thu, Sep 19,

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Yan Zhao
On Thu, Sep 19, 2019 at 02:29:54PM +0800, Yan Zhao wrote: > On Thu, Sep 19, 2019 at 02:32:03PM +0800, Jason Wang wrote: > > > > On 2019/9/19 下午2:17, Yan Zhao wrote: > > > On Thu, Sep 19, 2019 at 02:09:53PM +0800, Jason Wang wrote: > > >> On 2019/9/19 下午1:28, Yan Zhao wrote: > > >>> On Thu, Sep

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Yan Zhao
On Thu, Sep 19, 2019 at 02:32:03PM +0800, Jason Wang wrote: > > On 2019/9/19 下午2:17, Yan Zhao wrote: > > On Thu, Sep 19, 2019 at 02:09:53PM +0800, Jason Wang wrote: > >> On 2019/9/19 下午1:28, Yan Zhao wrote: > >>> On Thu, Sep 19, 2019 at 09:05:12AM +0800, Jason Wang wrote: > On 2019/9/18

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Jason Wang
On 2019/9/19 下午2:17, Yan Zhao wrote: On Thu, Sep 19, 2019 at 02:09:53PM +0800, Jason Wang wrote: On 2019/9/19 下午1:28, Yan Zhao wrote: On Thu, Sep 19, 2019 at 09:05:12AM +0800, Jason Wang wrote: On 2019/9/18 下午4:37, Tian, Kevin wrote: From: Jason Wang [mailto:jasow...@redhat.com] Sent:

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Yan Zhao
On Thu, Sep 19, 2019 at 02:09:53PM +0800, Jason Wang wrote: > > On 2019/9/19 下午1:28, Yan Zhao wrote: > > On Thu, Sep 19, 2019 at 09:05:12AM +0800, Jason Wang wrote: > >> On 2019/9/18 下午4:37, Tian, Kevin wrote: > From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Wednesday, September

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-19 Thread Jason Wang
On 2019/9/19 下午1:28, Yan Zhao wrote: On Thu, Sep 19, 2019 at 09:05:12AM +0800, Jason Wang wrote: On 2019/9/18 下午4:37, Tian, Kevin wrote: From: Jason Wang [mailto:jasow...@redhat.com] Sent: Wednesday, September 18, 2019 2:10 PM Note that the HVA to GPA mapping is not an 1:1 mapping. One HVA

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-18 Thread Yan Zhao
On Thu, Sep 19, 2019 at 09:05:12AM +0800, Jason Wang wrote: > > On 2019/9/18 下午4:37, Tian, Kevin wrote: > >> From: Jason Wang [mailto:jasow...@redhat.com] > >> Sent: Wednesday, September 18, 2019 2:10 PM > >> > Note that the HVA to GPA mapping is not an 1:1 mapping. One HVA > >> range >

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-18 Thread Jason Wang
On 2019/9/18 下午4:37, Tian, Kevin wrote: From: Jason Wang [mailto:jasow...@redhat.com] Sent: Wednesday, September 18, 2019 2:10 PM Note that the HVA to GPA mapping is not an 1:1 mapping. One HVA range could be mapped to several GPA ranges. This is fine. Currently vfio_dma maintains

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-18 Thread Tian, Kevin
> From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Wednesday, September 18, 2019 2:10 PM > > >> > >> Note that the HVA to GPA mapping is not an 1:1 mapping. One HVA > range > >> could be mapped to several GPA ranges. > > This is fine. Currently vfio_dma maintains IOVA->HVA mapping. > > > >

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-18 Thread Tian, Kevin
> From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Wednesday, September 18, 2019 2:10 PM > > On 2019/9/18 上午9:44, Tian, Kevin wrote: > >> From: Jason Wang [mailto:jasow...@redhat.com] > >> Sent: Tuesday, September 17, 2019 6:36 PM > >> > >> On 2019/9/17 下午4:48, Tian, Kevin wrote: >

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-18 Thread Tian, Kevin
> From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Wednesday, September 18, 2019 2:04 PM > > On 2019/9/18 上午9:31, Tian, Kevin wrote: > >> From: Alex Williamson [mailto:alex.william...@redhat.com] > >> Sent: Tuesday, September 17, 2019 10:54 PM > >> > >> On Tue, 17 Sep 2019 08:48:36 + >

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-18 Thread Jason Wang
On 2019/9/18 上午9:44, Tian, Kevin wrote: From: Jason Wang [mailto:jasow...@redhat.com] Sent: Tuesday, September 17, 2019 6:36 PM On 2019/9/17 下午4:48, Tian, Kevin wrote: From: Jason Wang [mailto:jasow...@redhat.com] Sent: Monday, September 16, 2019 4:33 PM On 2019/9/16 上午9:51, Tian, Kevin

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-18 Thread Jason Wang
On 2019/9/18 上午9:31, Tian, Kevin wrote: From: Alex Williamson [mailto:alex.william...@redhat.com] Sent: Tuesday, September 17, 2019 10:54 PM On Tue, 17 Sep 2019 08:48:36 + "Tian, Kevin" wrote: From: Jason Wang [mailto:jasow...@redhat.com] Sent: Monday, September 16, 2019 4:33 PM On

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-17 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Wednesday, September 18, 2019 9:32 AM > > > From: Alex Williamson [mailto:alex.william...@redhat.com] > > Sent: Tuesday, September 17, 2019 10:54 PM > > > > On Tue, 17 Sep 2019 08:48:36 + > > "Tian, Kevin" wrote: > > > > > > From: Jason Wang

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-17 Thread Tian, Kevin
> From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Tuesday, September 17, 2019 6:36 PM > > On 2019/9/17 下午4:48, Tian, Kevin wrote: > >> From: Jason Wang [mailto:jasow...@redhat.com] > >> Sent: Monday, September 16, 2019 4:33 PM > >> > >> > >> On 2019/9/16 上午9:51, Tian, Kevin wrote: > >>> Hi,

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-17 Thread Tian, Kevin
> From: Alex Williamson [mailto:alex.william...@redhat.com] > Sent: Tuesday, September 17, 2019 10:54 PM > > On Tue, 17 Sep 2019 08:48:36 + > "Tian, Kevin" wrote: > > > > From: Jason Wang [mailto:jasow...@redhat.com] > > > Sent: Monday, September 16, 2019 4:33 PM > > > > > > > > > On

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-17 Thread Alex Williamson
On Tue, 17 Sep 2019 08:48:36 + "Tian, Kevin" wrote: > > From: Jason Wang [mailto:jasow...@redhat.com] > > Sent: Monday, September 16, 2019 4:33 PM > > > > > > On 2019/9/16 上午9:51, Tian, Kevin wrote: > > > Hi, Jason > > > > > > We had a discussion about dirty page tracking in VFIO, when

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-17 Thread Jason Wang
On 2019/9/17 下午4:48, Tian, Kevin wrote: From: Jason Wang [mailto:jasow...@redhat.com] Sent: Monday, September 16, 2019 4:33 PM On 2019/9/16 上午9:51, Tian, Kevin wrote: Hi, Jason We had a discussion about dirty page tracking in VFIO, when vIOMMU is enabled:

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-17 Thread Tian, Kevin
> From: Jason Wang [mailto:jasow...@redhat.com] > Sent: Monday, September 16, 2019 4:33 PM > > > On 2019/9/16 上午9:51, Tian, Kevin wrote: > > Hi, Jason > > > > We had a discussion about dirty page tracking in VFIO, when vIOMMU > > is enabled: > > > >

Re: [Qemu-devel] vhost, iova, and dirty page tracking

2019-09-16 Thread Jason Wang
On 2019/9/16 上午9:51, Tian, Kevin wrote: Hi, Jason We had a discussion about dirty page tracking in VFIO, when vIOMMU is enabled: https://lists.nongnu.org/archive/html/qemu-devel/2019-09/msg02690.html It's actually a similar model as vhost - Qemu cannot interpose the fast-path DMAs thus