From mboxrd@z Thu Jan 1 00:00:00 1970 From: Isaku Yamahata Subject: [PATCH 10/21] exec.c: export last_ram_offset() Date: Thu, 29 Dec 2011 10:25:49 +0900 Message-ID: <93f94b3e2d30d0d951587e33ca1c997c720052a2.1325055139.git.yamahata@valinux.co.jp> References: Cc: yamahata@valinux.co.jp, t.hirofuchi@aist.go.jp, satoshi.itoh@aist.go.jp To: kvm@vger.kernel.org, qemu-devel@nongnu.org Return-path: Received: from mail.valinux.co.jp ([210.128.90.3]:47822 "EHLO mail.valinux.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754705Ab1L2B0D (ORCPT ); Wed, 28 Dec 2011 20:26:03 -0500 In-Reply-To: In-Reply-To: References: Sender: kvm-owner@vger.kernel.org List-ID: Signed-off-by: Isaku Yamahata --- exec-obsolete.h | 1 + exec.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/exec-obsolete.h b/exec-obsolete.h index 34b9fc5..8f69f1c 100644 --- a/exec-obsolete.h +++ b/exec-obsolete.h @@ -25,6 +25,7 @@ #ifndef CONFIG_USER_ONLY +ram_addr_t qemu_last_ram_offset(void); ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name, ram_addr_t size, void *host, MemoryRegion *mr); diff --git a/exec.c b/exec.c index 51b8d15..c8c6692 100644 --- a/exec.c +++ b/exec.c @@ -2907,7 +2907,7 @@ static ram_addr_t find_ram_offset(ram_addr_t size) return offset; } -static ram_addr_t last_ram_offset(void) +ram_addr_t qemu_last_ram_offset(void) { RAMBlock *block; ram_addr_t last = 0; @@ -2989,7 +2989,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name, QLIST_INSERT_HEAD(&ram_list.blocks, new_block, next); ram_list.phys_dirty = g_realloc(ram_list.phys_dirty, - last_ram_offset() >> TARGET_PAGE_BITS); + qemu_last_ram_offset() >> TARGET_PAGE_BITS); memset(ram_list.phys_dirty + (new_block->offset >> TARGET_PAGE_BITS), 0xff, size >> TARGET_PAGE_BITS); -- 1.7.1.1 From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rg4l3-00055S-6Q for qemu-devel@nongnu.org; Wed, 28 Dec 2011 20:26:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Rg4kz-0004JI-Q1 for qemu-devel@nongnu.org; Wed, 28 Dec 2011 20:26:12 -0500 Received: from mail.valinux.co.jp ([210.128.90.3]:42981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Rg4kz-0004IB-GP for qemu-devel@nongnu.org; Wed, 28 Dec 2011 20:26:09 -0500 From: Isaku Yamahata Date: Thu, 29 Dec 2011 10:25:49 +0900 Message-Id: <93f94b3e2d30d0d951587e33ca1c997c720052a2.1325055139.git.yamahata@valinux.co.jp> In-Reply-To: References: In-Reply-To: References: Subject: [Qemu-devel] [PATCH 10/21] exec.c: export last_ram_offset() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: kvm@vger.kernel.org, qemu-devel@nongnu.org Cc: yamahata@valinux.co.jp, t.hirofuchi@aist.go.jp, satoshi.itoh@aist.go.jp Signed-off-by: Isaku Yamahata --- exec-obsolete.h | 1 + exec.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/exec-obsolete.h b/exec-obsolete.h index 34b9fc5..8f69f1c 100644 --- a/exec-obsolete.h +++ b/exec-obsolete.h @@ -25,6 +25,7 @@ #ifndef CONFIG_USER_ONLY +ram_addr_t qemu_last_ram_offset(void); ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name, ram_addr_t size, void *host, MemoryRegion *mr); diff --git a/exec.c b/exec.c index 51b8d15..c8c6692 100644 --- a/exec.c +++ b/exec.c @@ -2907,7 +2907,7 @@ static ram_addr_t find_ram_offset(ram_addr_t size) return offset; } -static ram_addr_t last_ram_offset(void) +ram_addr_t qemu_last_ram_offset(void) { RAMBlock *block; ram_addr_t last = 0; @@ -2989,7 +2989,7 @@ ram_addr_t qemu_ram_alloc_from_ptr(DeviceState *dev, const char *name, QLIST_INSERT_HEAD(&ram_list.blocks, new_block, next); ram_list.phys_dirty = g_realloc(ram_list.phys_dirty, - last_ram_offset() >> TARGET_PAGE_BITS); + qemu_last_ram_offset() >> TARGET_PAGE_BITS); memset(ram_list.phys_dirty + (new_block->offset >> TARGET_PAGE_BITS), 0xff, size >> TARGET_PAGE_BITS); -- 1.7.1.1