From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:41218) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYJrV-0005o0-Hz for qemu-devel@nongnu.org; Wed, 07 Dec 2011 10:56:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RYJrT-0000nd-VM for qemu-devel@nongnu.org; Wed, 07 Dec 2011 10:56:49 -0500 Received: from mail-iy0-f173.google.com ([209.85.210.173]:46433) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RYJrT-0000nR-Q2 for qemu-devel@nongnu.org; Wed, 07 Dec 2011 10:56:47 -0500 Received: by iafj26 with SMTP id j26so1256294iaf.4 for ; Wed, 07 Dec 2011 07:56:47 -0800 (PST) Message-ID: <4EDF8CBC.4040606@codemonkey.ws> Date: Wed, 07 Dec 2011 09:56:44 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <1323022181-28110-1-git-send-email-avi@redhat.com> <4EDF8BDA.4030307@codemonkey.ws> <4EDF8C41.1040304@redhat.com> In-Reply-To: <4EDF8C41.1040304@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/07/2011 09:54 AM, Avi Kivity wrote: > On 12/07/2011 05:52 PM, Anthony Liguori wrote: >> 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. > > It's a layering violation, but I'll add something. Ok, let's add a docs/vmstate.txt and add a section that says "If you use the following functions, you probably need to call them again in post_load" and put these functions on the list. Regards, Anthony Liguori >