From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:37675) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxheo-0005Ou-Qz for qemu-devel@nongnu.org; Sun, 28 Aug 2011 11:52:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qxhen-0007ak-SR for qemu-devel@nongnu.org; Sun, 28 Aug 2011 11:52:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:8415) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qxhen-0007aP-C6 for qemu-devel@nongnu.org; Sun, 28 Aug 2011 11:52:21 -0400 Message-ID: <4E5A6431.5060309@redhat.com> Date: Sun, 28 Aug 2011 18:52:17 +0300 From: Avi Kivity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] [PULL] Memory API fixes - rom/device List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori , qemu-devel Anthony, please pull from git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git memory/core to receive fixes for the rom/device API - initialize ->ops and a new ->opaque. Avi Kivity (2): memory: fix memory_region_init_rom_device() not initializing ->ops memory: add opaque parameter to memory_region_init_rom_device() memory.c | 3 +++ memory.h | 1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/memory.c b/memory.c index 8e9ac46..1491a39 100644 --- a/memory.c +++ b/memory.c @@ -962,11 +962,14 @@ void memory_region_init_alias(MemoryRegion *mr, void memory_region_init_rom_device(MemoryRegion *mr, const MemoryRegionOps *ops, + void *opaque, DeviceState *dev, const char *name, uint64_t size) { memory_region_init(mr, name, size); + mr->ops = ops; + mr->opaque = opaque; mr->terminates = true; mr->destructor = memory_region_destructor_rom_device; mr->ram_addr = qemu_ram_alloc(dev, name, size); diff --git a/memory.h b/memory.h index 0553cc7..06b83ae 100644 --- a/memory.h +++ b/memory.h @@ -235,6 +235,7 @@ void memory_region_init_alias(MemoryRegion *mr, */ void memory_region_init_rom_device(MemoryRegion *mr, const MemoryRegionOps *ops, + void *opaque, DeviceState *dev, /* FIXME: layering violation */ const char *name, uint64_t size); -- error compiling committee.c: too many arguments to function