From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:45989) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYJnu-00036h-Dn for qemu-devel@nongnu.org; Wed, 07 Dec 2011 10:53:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYJnq-00084B-Lw for qemu-devel@nongnu.org; Wed, 07 Dec 2011 10:53:06 -0500 Received: from mail-fx0-f45.google.com ([209.85.161.45]:61438) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYJnq-00083v-Gn for qemu-devel@nongnu.org; Wed, 07 Dec 2011 10:53:02 -0500 Received: by faao26 with SMTP id o26so199830faa.4 for ; Wed, 07 Dec 2011 07:53:01 -0800 (PST) Message-ID: <4EDF8BDA.4030307@codemonkey.ws> Date: Wed, 07 Dec 2011 09:52:58 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1323022181-28110-1-git-send-email-avi@redhat.com> In-Reply-To: <1323022181-28110-1-git-send-email-avi@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 0/6] Memory API mutators List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Avi Kivity Cc: qemu-devel@nongnu.org On 12/04/2011 12:09 PM, Avi Kivity wrote: > This patchset introduces memory_region_set_enabled() and > memory_region_set_address() to avoid the requirement on memory > routers to track the internal state of the memory API (so they know > whether they need to add or remove a region). Instead, they can > simply copy the state of the region from the guest-exposed register > to the memory core, via the new mutator functions. Based on previous discussions, any time these functions are used, the caller more than likely needs to call them again in a post_load hook during restore, correct? It would be good to document this very clearly in the header docs for each function. Other than Blue's comments, the rest looks good to me. Regards, Anthony Liguori > > v2: > - fix minor bug in set_address() > - add set_alias_offset() > - two example users > > Avi Kivity (6): > memory: introduce memory_region_set_enabled() > memory: introduce memory_region_set_address() > memory: introduce memory_region_set_alias_offset() > memory: optimize empty transactions due to mutators > cirrus_vga: adapt to memory mutators API > piix_pci: adapt smram mapping to use memory mutators > > hw/cirrus_vga.c | 50 +++++++++++---------------------- > hw/piix_pci.c | 20 ++++--------- > memory.c | 81 +++++++++++++++++++++++++++++++++++++++++++++++------- > memory.h | 39 ++++++++++++++++++++++++++ > 4 files changed, 132 insertions(+), 58 deletions(-) >