From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54941) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGS0c-0001aq-22 for qemu-devel@nongnu.org; Sat, 18 Jul 2015 09:18:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGS0U-00030z-OK for qemu-devel@nongnu.org; Sat, 18 Jul 2015 09:18:30 -0400 Received: from mx5-phx2.redhat.com ([209.132.183.37]:38245) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGS0U-000306-GZ for qemu-devel@nongnu.org; Sat, 18 Jul 2015 09:18:22 -0400 Date: Sat, 18 Jul 2015 09:18:09 -0400 (EDT) From: Paolo Bonzini Message-ID: <135693298.407386.1437225489574.JavaMail.zimbra@redhat.com> In-Reply-To: References: <1435310564-9418-1-git-send-email-thibaut.collet@6wind.com> <55A867B5.9000100@redhat.com> <55A8FBB6.5040607@redhat.com> <55A90821.6000409@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v4 1/1] vhost user: add support of live migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?utf-8?Q?Marc-Andr=C3=A9?= Lureau Cc: Linhaifeng , "Michael S. Tsirkin" , Thibaut Collet , jasowang@redhat.com, QEMU , stefanha@redhat.com > > Do you know the size of the ram_addr_t space from > > VHOST_USER_SET_MEM_TABLE's user address and size fields? > > For some reason, vhost_get_log_size() also takes pc-bios region. I > think it's quite unnecessary given that the backend will not have > access to this region. That's by design. The pc-bios is mapped into the guest memory, so it is taken into account. It shouldn't be a problem, it's just wasting memory for <4GB VMs but it's not more expensive at run time. > get_log_size() also computes the size of the rings, I wonder if it's > necessary since the dev->mem->regions should already contain the > rings, isn't it? Indeed. > > If the size isn't needed, you can reuse LOG_BASE, ignoring the content > > of the payload and adding the SCM_RIGHTS file descriptor. > > That's possible, if we assume that existing backends won't leak the > passed fds (vapp does for ex), perhaps it needs a new flag (vhost-user > features flags are common with vhost, not sure we want to add that > here, but where else) Ok, that's for mst to answer. I think the leak wouldn't be too bad because right now vhost-user live migration corrupts data so nobody must be using it. But if you want to introduce a new message, that would also be okay of course. Paolo