From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:56034) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Td0eK-0007IR-0e for qemu-devel@nongnu.org; Mon, 26 Nov 2012 10:31:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Td0eG-0003gK-1J for qemu-devel@nongnu.org; Mon, 26 Nov 2012 10:31:07 -0500 Received: from hub021-nj-5.exch021.serverdata.net ([206.225.164.221]:40504) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Td0eF-0003gB-UO for qemu-devel@nongnu.org; Mon, 26 Nov 2012 10:31:03 -0500 Message-ID: <50B38B36.8040201@cloudswitch.com> Date: Mon, 26 Nov 2012 10:31:02 -0500 From: Don Koch MIME-Version: 1.0 References: <1353414712-27072-1-git-send-email-stefanha@redhat.com> <1353414712-27072-4-git-send-email-stefanha@redhat.com> <50ABCAC8.5000707@cloudswitch.com> <20121121075900.GA13504@stefanha-thinkpad.redhat.com> In-Reply-To: <20121121075900.GA13504@stefanha-thinkpad.redhat.com> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit 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: Stefan Hajnoczi Cc: Kevin Wolf , Anthony Liguori , "Michael S. Tsirkin" , qemu-devel@nongnu.org, khoa@us.ibm.com, Stefan Hajnoczi , Paolo Bonzini , asias@redhat.com On 11/21/2012 02:59 AM, Stefan Hajnoczi wrote: > 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 Ah, OK. I caught this mail later than my last response (for whatever reason, the last patch you sent went to my inbox, this response got dumped in my qemu folder - go figure). -d