From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44469) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4TFu-00063I-Hp for qemu-devel@nongnu.org; Mon, 15 Jun 2015 08:12:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4TFp-00078y-Ie for qemu-devel@nongnu.org; Mon, 15 Jun 2015 08:12:46 -0400 Received: from mail-ig0-f180.google.com ([209.85.213.180]:38878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4TFp-00078V-E3 for qemu-devel@nongnu.org; Mon, 15 Jun 2015 08:12:41 -0400 Received: by igblz2 with SMTP id lz2so48708157igb.1 for ; Mon, 15 Jun 2015 05:12:40 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20150615103617-mutt-send-email-mst@redhat.com> References: <55791F29.6060000@redhat.com> <5579228E.1040705@redhat.com> <20150611123433-mutt-send-email-mst@redhat.com> <20150611141135-mutt-send-email-mst@redhat.com> <557A9075.5030409@redhat.com> <20150612162720-mutt-send-email-mst@redhat.com> <557E8211.1050606@redhat.com> <20150615103617-mutt-send-email-mst@redhat.com> Date: Mon, 15 Jun 2015 14:12:40 +0200 Message-ID: From: Thibaut Collet Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH v3 2/2] vhost user: Add RARP injection for legacy guest List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Jason Wang , qemu-devel , Stefan Hajnoczi After a resume operation the guest always kicks the backend for each virtual queues. A live migration does a suspend operation on the old host and a resume operation on the new host. So the backend has a kick after migration. I have checked this point with a legacy guest (redhat 6-5 with kernel version 2.6.32-431.29.2) and the kick occurs after migration or resume. Jason have you an example of legacy guest that will not kick the virtual queue after a resume ? On Mon, Jun 15, 2015 at 10:44 AM, Michael S. Tsirkin wrote: > On Mon, Jun 15, 2015 at 03:43:13PM +0800, Jason Wang wrote: >> >> >> On 06/12/2015 10:28 PM, Michael S. Tsirkin wrote: >> > On Fri, Jun 12, 2015 at 03:55:33PM +0800, Jason Wang wrote: >> >> >> >> On 06/11/2015 08:13 PM, Michael S. Tsirkin wrote: >> >>> On Thu, Jun 11, 2015 at 02:10:48PM +0200, Thibaut Collet wrote: >> >>>> I am not sure to understand your remark: >> >>>> >> >>>>> It needs to be sent when backend is activated by guest kick >> >>>>> (in case of virtio 1, it's possible to use DRIVER_OK for this). >> >>>>> This does not happen when VM still runs on source. >> >>>> Could you confirm rarp can be sent by backend when the >> >>>> VHOST_USER_SET_VRING_KICK message is received by the backend ? >> >>> No - the time to send pakets is when you start processing >> >>> the rings. >> >>> >> >>> And the time to do that is when you detect a kick on >> >>> an eventfd, not when said fd is set. >> >>> >> >> Probably not. What if guest is only doing receiving? >> > Clarification: the kick can be on any VQs. >> > In your example, guest kicks after adding receive buffers. >> >> Yes, but refill only happens on we are lacking of receive buffers. It is >> not guaranteed to happen just after migration, we may have still have >> enough rx buffers for device to receive. > > I think we also kick the backend after migration, do we not? > Further, DRIVER_OK can be used as a signal to start backend too. > >> > >> >> In this case, you >> >> won't detect any kick if you don't send the rarp first.