From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53568) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cRCav-0002A1-Tn for qemu-devel@nongnu.org; Wed, 11 Jan 2017 01:41:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cRCav-0006PS-54 for qemu-devel@nongnu.org; Wed, 11 Jan 2017 01:41:13 -0500 Date: Wed, 11 Jan 2017 14:41:02 +0800 From: Fam Zheng Message-ID: <20170111064102.GA10036@lemon> References: <20161220163139.12016-1-famz@redhat.com> <20161220163139.12016-2-famz@redhat.com> <078da452-2793-88e4-7eec-591ba875c13f@weilnetz.de> <127070fc-ded9-04aa-bbc8-2f96f1c9fed7@weilnetz.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <127070fc-ded9-04aa-bbc8-2f96f1c9fed7@weilnetz.de> Subject: Re: [Qemu-devel] [PATCH 1/4] ramblock-notifier: new List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: qemu-devel@nongnu.org, Kevin Wolf , Vincent Palatin , qemu-block@nongnu.org, Max Reitz , borntraeger@de.ibm.com, Stefan Hajnoczi , Paolo Bonzini , Karl Rister On Wed, 01/11 06:48, Stefan Weil wrote: > On 01/11/17 06:38, Stefan Weil wrote: > > Hi, > > > > this fails for me when building with XEN support. > > I noticed the failure when testing the latest HAXM patches. > > See compiler output below. > > > > Regards > > Stefan > > The patch compiles with this modification: > > > diff --git a/xen-mapcache.c b/xen-mapcache.c > index dc9b321491..31debdfb2c 100644 > --- a/xen-mapcache.c > +++ b/xen-mapcache.c > @@ -163,7 +163,7 @@ static void xen_remap_bucket(MapCacheEntry *entry, > err = g_malloc0(nb_pfn * sizeof (int)); > > if (entry->vaddr_base != NULL) { > - ram_block_removed(entry->vaddr_base, entry->size); > + ram_block_notify_remove(entry->vaddr_base, entry->size); > if (munmap(entry->vaddr_base, entry->size) != 0) { > perror("unmap fails"); > exit(-1); > @@ -189,7 +189,7 @@ static void xen_remap_bucket(MapCacheEntry *entry, > entry->valid_mapping = (unsigned long *) g_malloc0(sizeof(unsigned > long) * > BITS_TO_LONGS(size >> XC_PAGE_SHIFT)); > > - ram_block_added(entry->vaddr_base, entry->size); > + ram_block_notify_add(entry->vaddr_base, entry->size); > bitmap_zero(entry->valid_mapping, nb_pfn); > for (i = 0; i < nb_pfn; i++) { > if (!err[i]) { > @@ -399,7 +399,7 @@ static void > xen_invalidate_map_cache_entry_unlocked(uint8_t *buffer) > } > > pentry->next = entry->next; > - ram_block_removed(entry->vaddr_base, entry->size); > + ram_block_notify_remove(entry->vaddr_base, entry->size); > if (munmap(entry->vaddr_base, entry->size) != 0) { > perror("unmap fails"); > exit(-1); > Yes, this matches what Paolo pointed out in his reply. I'll fix that in the next revision. Fam