Received: from eggs.gnu.org ([140.186.70.92]:58210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXGVd-0001Rg-Th for qemu-devel@nongnu.org; Sun, 04 Dec 2011 13:09:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RXGVd-0004GP-0W for qemu-devel@nongnu.org; Sun, 04 Dec 2011 13:09:53 -0500 Received: from mx1.redhat.com ([209.132.183.28]:64054) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RXGVc-0004Fq-QI for qemu-devel@nongnu.org; Sun, 04 Dec 2011 13:09:52 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pB4I9p2e001589 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Sun, 4 Dec 2011 13:09:51 -0500 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pB4I9ohJ024115 for ; Sun, 4 Dec 2011 13:09:51 -0500 From: Avi Kivity Date: Sun, 4 Dec 2011 20:09:35 +0200 Message-Id: <1323022181-28110-1-git-send-email-avi@redhat.com> Subject: [Qemu-devel] [PATCH v2 0/6] Memory API mutators List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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. 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(-) -- 1.7.7.1