From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPrPo-0000yE-Ug for qemu-devel@nongnu.org; Thu, 13 Aug 2015 08:15:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZPrPn-0008ER-Oi for qemu-devel@nongnu.org; Thu, 13 Aug 2015 08:15:24 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZPrPn-0008EL-GP for qemu-devel@nongnu.org; Thu, 13 Aug 2015 08:15:23 -0400 Date: Thu, 13 Aug 2015 15:15:20 +0300 From: "Michael S. Tsirkin" Message-ID: <1439468033-6413-15-git-send-email-mst@redhat.com> References: <1439468033-6413-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1439468033-6413-1-git-send-email-mst@redhat.com> Subject: [Qemu-devel] [PULL 14/24] pc: Use PCMachineState as pc_guest_info_init() argument List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Peter Maydell , Richard Henderson , Eduardo Habkost , Paolo Bonzini From: Eduardo Habkost Signed-off-by: Eduardo Habkost Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 3 +-- hw/i386/pc.c | 7 +++---- hw/i386/pc_piix.c | 3 +-- hw/i386/pc_q35.c | 3 +-- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index e1d20ad..94d7afb 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -165,8 +165,7 @@ void pc_cpus_init(const char *cpu_model, DeviceState *icc_bridge); void pc_hot_add_cpu(const int64_t id, Error **errp); void pc_acpi_init(const char *default_dsdt); -PcGuestInfo *pc_guest_info_init(ram_addr_t below_4g_mem_size, - ram_addr_t above_4g_mem_size); +PcGuestInfo *pc_guest_info_init(PCMachineState *pcms); void pc_set_legacy_acpi_data_size(void); diff --git a/hw/i386/pc.c b/hw/i386/pc.c index a9a9cf4..081ef83 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1189,15 +1189,14 @@ void pc_guest_info_machine_done(Notifier *notifier, void *data) acpi_setup(&guest_info_state->info); } -PcGuestInfo *pc_guest_info_init(ram_addr_t below_4g_mem_size, - ram_addr_t above_4g_mem_size) +PcGuestInfo *pc_guest_info_init(PCMachineState *pcms) { PcGuestInfoState *guest_info_state = g_malloc0(sizeof *guest_info_state); 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->ram_size_below_4g = pcms->below_4g_mem_size; + guest_info->ram_size = pcms->below_4g_mem_size + pcms->above_4g_mem_size; guest_info->apic_id_limit = pc_apic_id_limit(max_cpus); guest_info->apic_xrupt_override = kvm_allows_irq0_override(); guest_info->numa_nodes = nb_numa_nodes; diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 559f4e5..9364c47 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -160,8 +160,7 @@ static void pc_init1(MachineState *machine) rom_memory = system_memory; } - guest_info = pc_guest_info_init(pcms->below_4g_mem_size, - pcms->above_4g_mem_size); + guest_info = pc_guest_info_init(pcms); guest_info->has_acpi_build = has_acpi_build; guest_info->legacy_acpi_table_size = legacy_acpi_table_size; diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 489dfcb..af5fd9f 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -151,8 +151,7 @@ static void pc_q35_init(MachineState *machine) rom_memory = get_system_memory(); } - guest_info = pc_guest_info_init(pcms->below_4g_mem_size, - pcms->above_4g_mem_size); + guest_info = pc_guest_info_init(pcms); guest_info->isapc_ram_fw = false; guest_info->has_acpi_build = has_acpi_build; guest_info->has_reserved_memory = has_reserved_memory; -- MST