From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LOves-0000iK-K2 for qemu-devel@nongnu.org; Mon, 19 Jan 2009 10:03:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LOveq-0000he-Sz for qemu-devel@nongnu.org; Mon, 19 Jan 2009 10:03:22 -0500 Received: from [199.232.76.173] (port=33409 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LOveq-0000hW-NT for qemu-devel@nongnu.org; Mon, 19 Jan 2009 10:03:20 -0500 Received: from mx2.redhat.com ([66.187.237.31]:33030) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LOveq-0001NR-1d for qemu-devel@nongnu.org; Mon, 19 Jan 2009 10:03:20 -0500 Message-ID: <49749631.5090700@redhat.com> Date: Mon, 19 Jan 2009 17:03:13 +0200 From: Avi Kivity MIME-Version: 1.0 References: <1232308399-21679-1-git-send-email-avi@redhat.com> <1232308399-21679-2-git-send-email-avi@redhat.com> <49749497.6040701@codemonkey.ws> In-Reply-To: <49749497.6040701@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 1/5] Add target memory mapping API Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org Anthony Liguori wrote: >> + if ((pd & ~TARGET_PAGE_MASK) != IO_MEM_RAM) { >> + if (done || bounce.buffer) { >> + break; >> + } >> + bounce.buffer = qemu_memalign(TARGET_PAGE_SIZE, >> TARGET_PAGE_SIZE); >> + bounce.addr = addr; >> + bounce.len = l; >> > > I like the bouncing approach. Namely, that it never bounces more than > a page at a time. I think that's clever. I tried to make it as stupid as possible. Looks like I failed. > > Could you add some documentation to this function? Namely, making it > clear that it can return NULL and that if it does, the caller must retry. Sure. > If map() fails, how does the caller determine when to retry the mapping? > By reading the next patch :) -- error compiling committee.c: too many arguments to function