From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39145) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzrb3-0004Gp-Rd for qemu-devel@nongnu.org; Wed, 25 Jun 2014 14:07:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wzraw-0007jI-Dc for qemu-devel@nongnu.org; Wed, 25 Jun 2014 14:07:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38790) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wzraw-0007jD-5g for qemu-devel@nongnu.org; Wed, 25 Jun 2014 14:06:54 -0400 Date: Wed, 25 Jun 2014 21:07:18 +0300 From: "Michael S. Tsirkin" Message-ID: <20140625180718.GB16636@redhat.com> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Content-Transfer-Encoding: quoted-printable 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: Paolo Bonzini , "Damjan Marion (damarion)" , qemu-devel On Wed, Jun 25, 2014 at 07:56:46PM +0300, Nikolay Nikolaev wrote: > On Wed, Jun 25, 2014 at 7:44 PM, Paolo Bonzini wr= ote: > >> nregions: 4 > >> region: > >> gpa =3D 0x100000000 > >> size =3D 3221225472 > >> ua =3D 0x2aab6ac00000 > > > > High memory, above 3 gigabytes. > > > >> region: > >> gpa =3D 0xFFFC0000 > >> size =3D 262144 > >> ua =3D 0x7fc13d200000 > > > > This is the BIOS. There shouldn't be any FD for this one, it > > is not allocated in hugetlbfs. > > > >> region: > >> gpa =3D 0x0 > >> size =3D 655360 > >> ua =3D 0x2aaaaac00000 > >> region: > >> gpa =3D 0xC0000 > >> size =3D 3220439040 > >> ua =3D 0x2aaaaacc0000 > > > > Together, it's the first 3 GB of memory. > > > > 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? > The vring addresses are QEMU UA addresses. Of course vhost-user can > translate them to guest physical before sending the message. It seems useful to have them as QEMU UA, this will allow frontends other than virtio where QEMU operates the ring. > > perhaps the offset can replace the ua). > > > >> BTW Any idea what to do with region 2, it doesn=E2=80=99t look like = the one belonging > >> to the same place, but qemu_get_ram_fd() returns same FD for it. > > > > This must be a bug. I would have expected qemu_get_ram_fd to return = -1 > > here, so no descriptor should be passed to vhost-user. > > > > Paolo