Received: from eggs.gnu.org ([2001:4830:134:3::10]:38054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1L2k-0008BW-JL for qemu-devel@nongnu.org; Thu, 09 Jan 2014 14:13:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W1L2e-0006A2-JQ for qemu-devel@nongnu.org; Thu, 09 Jan 2014 14:13:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32388) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W1L2e-00069x-BS for qemu-devel@nongnu.org; Thu, 09 Jan 2014 14:13:20 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s09JDImE015751 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 9 Jan 2014 14:13:19 -0500 From: Eduardo Habkost Date: Thu, 9 Jan 2014 17:12:42 -0200 Message-Id: <1389294763-8137-2-git-send-email-ehabkost@redhat.com> In-Reply-To: <1389294763-8137-1-git-send-email-ehabkost@redhat.com> References: <1389294763-8137-1-git-send-email-ehabkost@redhat.com> Subject: [Qemu-devel] [PATCH 1/2] pc: Save size of RAM below 4GB List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Igor Mammedov , Gerd Hoffmann , "Michael S. Tsirkin" The ram_below_4g value will be useful in other places, such as the ACPI table code, and other code that currently requires passing below_4g_mem_size around in function arguments. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 1 + include/hw/i386/pc.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 3cd8f38..a2efc99 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1068,6 +1068,7 @@ PcGuestInfo *pc_guest_info_init(ram_addr_t below_4g_mem_size, PcGuestInfo *guest_info = &guest_info_state->info; int i, j; + guest_info->ram_size_below_4g = below_4g_mem_size; guest_info->ram_size = below_4g_mem_size + above_4g_mem_size; guest_info->apic_id_limit = pc_apic_id_limit(max_cpus); guest_info->apic_xrupt_override = kvm_allows_irq0_override(); diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 24eb3de..8cb637b 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -35,7 +35,7 @@ typedef struct PcPciInfo { struct PcGuestInfo { bool has_pci_info; bool isapc_ram_fw; - hwaddr ram_size; + hwaddr ram_size, ram_size_below_4g; unsigned apic_id_limit; bool apic_xrupt_override; uint64_t numa_nodes; -- 1.8.4.2