From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzrVT-0000go-2G for qemu-devel@nongnu.org; Wed, 25 Jun 2014 14:01:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WzrVM-0005Cd-V0 for qemu-devel@nongnu.org; Wed, 25 Jun 2014 14:01:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39424) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WzrVM-0005CR-Mt for qemu-devel@nongnu.org; Wed, 25 Jun 2014 14:01:08 -0400 Message-ID: <53AB0E5B.5060000@redhat.com> Date: Wed, 25 Jun 2014 20:00:59 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <20140625142704.GC15277@redhat.com> <7B7FFD16-82ED-4D0E-8B83-A6448DC9A344@cisco.com> <20140625152936.GB15720@redhat.com> <20140625155038.GG15720@redhat.com> <7760835F-C1F1-4023-960D-A70096465EBD@cisco.com> <122055914.32517283.1403714698790.JavaMail.zimbra@redhat.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] vhost-user: broken mem regions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikolay Nikolaev Cc: qemu-devel , VirtualOpenSystems Technical Team , "Damjan Marion (damarion)" , "Michael S. Tsirkin" Il 25/06/2014 19:06, Nikolay Nikolaev ha scritto: >> > I understand now what you mean. Yeah, the format should be changed >> > to include the offset (why does vhost-user need the ua at all? >> > perhaps the offset can replace the ua). > I am trying to do the math here. So if this file is mapped by QEMU > into a single file then probably > (region[4].ua - region[3].ua) should give you the offset. And also > (region[4].ua - region[1].ua) shoudl give the above 3G offset. Or I am > missing something? This is correct, but in principle it's not required to map all the areas. The lowest region could correspond to a offset=65536, or something like that. It's better to change the vring values to use offsets instead of absolute addresses. Paolo