From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41128) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X03s5-0002Ir-1y for qemu-devel@nongnu.org; Thu, 26 Jun 2014 03:13:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X03rx-0008Qb-HG for qemu-devel@nongnu.org; Thu, 26 Jun 2014 03:13:25 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X03rx-0008QP-7f for qemu-devel@nongnu.org; Thu, 26 Jun 2014 03:13:17 -0400 Date: Thu, 26 Jun 2014 10:13:40 +0300 From: "Michael S. Tsirkin" Message-ID: <20140626071340.GB21685@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> <539537F4-A2DD-416A-9245-C31905138EFD@cisco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <539537F4-A2DD-416A-9245-C31905138EFD@cisco.com> 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: "Damjan Marion (damarion)" Cc: Paolo Bonzini , "qemu-devel@nongnu.org" , Nikolay Nikolaev On Wed, Jun 25, 2014 at 09:52:09PM +0000, Damjan Marion (damarion) wrote: >=20 > On 25 Jun 2014, at 18:44, Paolo Bonzini wrote: >=20 > >> nregions: 4 > >> region: > >> gpa =3D 0x100000000 > >> size =3D 3221225472 > >> ua =3D 0x2aab6ac00000 > >=20 > > High memory, above 3 gigabytes. > >=20 > >> region: > >> gpa =3D 0xFFFC0000 > >> size =3D 262144 > >> ua =3D 0x7fc13d200000 > >=20 > > This is the BIOS. There shouldn't be any FD for this one, it > > is not allocated in hugetlbfs. > >=20 > >> region: > >> gpa =3D 0x0 > >> size =3D 655360 > >> ua =3D 0x2aaaaac00000 > >> region: > >> gpa =3D 0xC0000 > >> size =3D 3220439040 > >> ua =3D 0x2aaaaacc0000 > >=20 > > Together, it's the first 3 GB of memory. > >=20 > > 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). > >=20 > >> 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. > >=20 > > 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. >=20 > Problem is inside qemu_get_ram_block(): >=20 >=20 > if (block && addr - block->offset < block->length) { > goto found; > } >=20 > this is true if we have > 4G of RAM allocated. Hmm I don't get it. Why is it always true for >4G RAM? >=20 > Any advice how to fix this? >=20 >=20