Received: from eggs.gnu.org ([140.186.70.92]:54889) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3lh7-00025q-KM for qemu-devel@nongnu.org; Wed, 14 Sep 2011 05:23:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R3lh5-0000ed-Ry for qemu-devel@nongnu.org; Wed, 14 Sep 2011 05:23:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:54531) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R3lh5-0000eM-JC for qemu-devel@nongnu.org; Wed, 14 Sep 2011 05:23:47 -0400 From: Avi Kivity Date: Wed, 14 Sep 2011 12:23:39 +0300 Message-Id: <1315992222-24069-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH 0/3] Memory API mutators List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Anthony Liguori , Peter Maydell 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. Please review. Do we need a memory_region_set_size() as well? Do we want memory_region_set_attributes(mr, MR_ATTR_ENABLED | MR_ATTR_SIZE, (MemoryRegionAttributes) { .enabled = s->enabled, .address = s->addr, }); ? Avi Kivity (3): memory: introduce memory_region_set_enabled() memory: introduce memory_region_set_address() memory: optimize empty transactions due to mutators memory.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++--------- memory.h | 28 +++++++++++++++++++++++++++ 2 files changed, 82 insertions(+), 10 deletions(-) -- 1.7.6.3