From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37917) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tb5D7-0000Ib-QX for qemu-devel@nongnu.org; Wed, 21 Nov 2012 02:59:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tb5D6-0005EI-HH for qemu-devel@nongnu.org; Wed, 21 Nov 2012 02:59:05 -0500 Received: from mail-ee0-f45.google.com ([74.125.83.45]:48566) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tb5D6-0005E7-9m for qemu-devel@nongnu.org; Wed, 21 Nov 2012 02:59:04 -0500 Received: by mail-ee0-f45.google.com with SMTP id d49so4046528eek.4 for ; Tue, 20 Nov 2012 23:59:03 -0800 (PST) Date: Wed, 21 Nov 2012 08:59:00 +0100 From: Stefan Hajnoczi Message-ID: <20121121075900.GA13504@stefanha-thinkpad.redhat.com> References: <1353414712-27072-1-git-send-email-stefanha@redhat.com> <1353414712-27072-4-git-send-email-stefanha@redhat.com> <50ABCAC8.5000707@cloudswitch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <50ABCAC8.5000707@cloudswitch.com> Subject: Re: [Qemu-devel] [PATCH v2 3/8] dataplane: add host memory mapping code List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Don Koch Cc: Kevin Wolf , Anthony Liguori , "Michael S. Tsirkin" , qemu-devel@nongnu.org, khoa@us.ibm.com, Stefan Hajnoczi , Paolo Bonzini , asias@redhat.com On Tue, Nov 20, 2012 at 01:24:08PM -0500, Don Koch wrote: > On 11/20/2012 07:31 AM, Stefan Hajnoczi wrote: > > +void hostmem_init(Hostmem *hostmem) > > +{ > > + memset(hostmem, 0, sizeof(*hostmem)); > > + > > + hostmem->listener = (MemoryListener){ > > + .begin = hostmem_listener_nop, > > + .commit = hostmem_listener_commit, > > + .region_add = hostmem_listener_region_add, > > + .region_del = hostmem_listener_section_nop, > > + .region_nop = hostmem_listener_region_add, > Really? Yes. I will rename the function in the next version of the patch to make it clear this is correct. Since we rebuild the entire regions list on every update transaction, we care about the "nop" (unchanged) regions too. They need to be added to the new list we're building. The deleted regions are ignored because we're building a new regions list from scratch anyway. Stefan