From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43532) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UklBP-0006ms-Rk for qemu-devel@nongnu.org; Thu, 06 Jun 2013 21:09:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UklBO-0004W3-VR for qemu-devel@nongnu.org; Thu, 06 Jun 2013 21:09:35 -0400 Received: from mail-qa0-x22e.google.com ([2607:f8b0:400d:c00::22e]:52481) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UklBO-0004Vw-RG for qemu-devel@nongnu.org; Thu, 06 Jun 2013 21:09:34 -0400 Received: by mail-qa0-f46.google.com with SMTP id ih17so737133qab.5 for ; Thu, 06 Jun 2013 18:09:34 -0700 (PDT) Sender: Paolo Bonzini Message-ID: <51B132C1.8010406@redhat.com> Date: Thu, 06 Jun 2013 21:09:21 -0400 From: Paolo Bonzini MIME-Version: 1.0 References: <1369948629-2833-1-git-send-email-pbonzini@redhat.com> <1369948629-2833-11-git-send-email-pbonzini@redhat.com> <51B04A17.7080106@ozlabs.ru> In-Reply-To: <51B04A17.7080106@ozlabs.ru> Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 10/21] memory: make section size a 128-bit integer List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexey Kardashevskiy Cc: Alex Williamson , qemu-devel@nongnu.org, David Gibson Il 06/06/2013 04:36, Alexey Kardashevskiy ha scritto: >> > diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c >> > index 693a9ff..c89676b 100644 >> > --- a/hw/misc/vfio.c >> > +++ b/hw/misc/vfio.c >> > @@ -1953,7 +1953,7 @@ static void vfio_listener_region_add(MemoryListener *listener, >> > } >> > >> > iova = TARGET_PAGE_ALIGN(section->offset_within_address_space); >> > - end = (section->offset_within_address_space + section->size) & >> > + end = (section->offset_within_address_space + int128_get64(section->size)) & >> > TARGET_PAGE_MASK; > > > Another problem with this patch. Here is some more context (***): By the time you get here, this should have already crashed at this code that patch 13 adds: diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c index c89676b..52fb036 100644 --- a/hw/misc/vfio.c +++ b/hw/misc/vfio.c @@ -1939,6 +1939,8 @@ static void vfio_listener_region_add(MemoryListener *listener, void *vaddr; int ret; + assert(!memory_region_is_iommu(section->mr)); + so it seems like a bug in your VFIO patches. Paolo