From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53717) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1et6h1-0003ry-99 for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:07:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1et6gw-0004qU-8N for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:07:23 -0500 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:35080 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1et6gw-0004qM-39 for qemu-devel@nongnu.org; Tue, 06 Mar 2018 02:07:18 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3F32484221 for ; Tue, 6 Mar 2018 07:07:10 +0000 (UTC) Date: Tue, 6 Mar 2018 15:06:54 +0800 From: Peter Xu Message-ID: <20180306070654.GF3615@xz-mi> References: <20180216131625.9639-1-dgilbert@redhat.com> <20180216131625.9639-12-dgilbert@redhat.com> <20180228084234.GA27381@xz-mi> <20180305174241.GR3131@work-vm> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20180305174241.GR3131@work-vm> Subject: Re: [Qemu-devel] [PATCH v3 11/29] vhost+postcopy: Transmit 'listen' to client List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Dr. David Alan Gilbert" Cc: qemu-devel@nongnu.org, maxime.coquelin@redhat.com, marcandre.lureau@redhat.com, imammedo@redhat.com, mst@redhat.com, quintela@redhat.com, aarcange@redhat.com On Mon, Mar 05, 2018 at 05:42:42PM +0000, Dr. David Alan Gilbert wrote: > * Peter Xu (peterx@redhat.com) wrote: > > On Fri, Feb 16, 2018 at 01:16:07PM +0000, Dr. David Alan Gilbert (git) wrote: > > > > [...] > > > > > typedef struct VuVirtqElement { > > > diff --git a/docs/interop/vhost-user.txt b/docs/interop/vhost-user.txt > > > index 621543e654..bdec9ec0e8 100644 > > > --- a/docs/interop/vhost-user.txt > > > +++ b/docs/interop/vhost-user.txt > > > @@ -682,6 +682,12 @@ Master message types > > > the slave must open a userfaultfd for later use. > > > Note that at this stage the migration is still in precopy mode. > > > > > > + * VHOST_USER_POSTCOPY_LISTEN > > > + Id: 27 > > > + Master payload: N/A > > > + > > > + Master advises slave that a transition to postcopy mode has happened. > > > > Could we add something to explain why this listen needs to be > > broadcasted to clients? Since I failed to find it out quickly > > myself. :( > > I've changed this to: > > * VHOST_USER_POSTCOPY_LISTEN > Id: 29 > Master payload: N/A > > Master advises slave that a transition to postcopy mode has happened. > The slave must ensure that shared memory is registered with userfaultfd > to cause faulting of non-present pages. But shouldn't this be assured by the SET_MEM_TABLE call? Sorry for being not that familiar with vhost-user protocol... but what's the correct order of these commands? POSTCOPY_ADVISE POSTCOPY_LISTEN SET_MEM_TABLE ? Thanks, > > This is always sent sometime after a VHOST_USER_POSTCOPY_ADVISE, and > thus only when VHOST_USER_PROTOCOL_F_PAGEFAULT is supported. > > Dave > > > -- > > Peter Xu > -- > Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK -- Peter Xu