From patchwork Tue Oct 2 11:33:06 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 188486 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 7F5712C00AB for ; Tue, 2 Oct 2012 22:40:41 +1000 (EST) Received: from localhost ([::1]:50650 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ0kQ-0007Mj-PY for incoming@patchwork.ozlabs.org; Tue, 02 Oct 2012 07:34:46 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36809) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ0jb-0005Yh-Nn for qemu-devel@nongnu.org; Tue, 02 Oct 2012 07:34:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TJ0ja-0007cu-1b for qemu-devel@nongnu.org; Tue, 02 Oct 2012 07:33:55 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50720) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TJ0jZ-0007cF-Pz for qemu-devel@nongnu.org; Tue, 02 Oct 2012 07:33:53 -0400 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 q92BXrX0019534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 2 Oct 2012 07:33:53 -0400 Received: from trasno.mitica (ovpn-116-55.ams2.redhat.com [10.36.116.55]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q92BXbae001633; Tue, 2 Oct 2012 07:33:52 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Tue, 2 Oct 2012 13:33:06 +0200 Message-Id: <1349177616-5341-12-git-send-email-quintela@redhat.com> In-Reply-To: <1349177616-5341-1-git-send-email-quintela@redhat.com> References: <1349177616-5341-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 11/41] ram: Export last_ram_offset() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Is the only way of knowing the RAM size. Signed-off-by: Juan Quintela Reviewed-by: Paolo Bonzini --- cpu-all.h | 2 ++ exec.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cpu-all.h b/cpu-all.h index 74d3681..5408782 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -517,6 +517,8 @@ extern int mem_prealloc; void dump_exec_info(FILE *f, fprintf_function cpu_fprintf); #endif /* !CONFIG_USER_ONLY */ +ram_addr_t last_ram_offset(void); + int cpu_memory_rw_debug(CPUArchState *env, target_ulong addr, uint8_t *buf, int len, int is_write); diff --git a/exec.c b/exec.c index bb6aa4a..e613329 100644 --- a/exec.c +++ b/exec.c @@ -2462,7 +2462,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 last_ram_offset(void) { RAMBlock *block; ram_addr_t last = 0;