qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH for-2.5 11/18] pc: Use PCMachineState as pc_guest_info_init() argument
Date: Fri,  7 Aug 2015 16:55:52 -0300	[thread overview]
Message-ID: <1438977359-29840-12-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1438977359-29840-1-git-send-email-ehabkost@redhat.com>

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 hw/i386/pc.c         | 7 +++----
 hw/i386/pc_piix.c    | 3 +--
 hw/i386/pc_q35.c     | 3 +--
 include/hw/i386/pc.h | 3 +--
 4 files changed, 6 insertions(+), 10 deletions(-)

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;
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);
 
-- 
2.1.0

  parent reply	other threads:[~2015-08-07 19:56 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-07 19:55 [Qemu-devel] [PATCH for-2.5 00/18] pc: Initialization and compat function cleanup Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 01/18] pc: Use PC_COMPAT_* for CPUID feature compatibility Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 02/18] target-i386: Remove x86_cpu_compat_set_features() Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 03/18] pc: Use error_abort when registering properties Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 04/18] pc: Rename pc_machine variables to pcms Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 05/18] pc: Move PCMachineClass, PCMachineState to qemu/typedefs.h Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 06/18] pc: Eliminate pc_common_machine_options() Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 07/18] pc: Eliminate pc_default_machine_options() Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 08/18] pc: Use PCMachineState for pc_cmos_init() argument Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 09/18] pc: Use PCMachineState for pc_memory_init() argument Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 10/18] pc: Move {above, below}_4g_mem_size variables to PCMachineState Eduardo Habkost
2015-08-07 19:55 ` Eduardo Habkost [this message]
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 12/18] pc: Remove redundant arguments from *load_linux() Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 13/18] pc: Remove redundant arguments from pc_cmos_init() Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 14/18] pc: Remove redundant arguments from pc_memory_init() Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 15/18] pc: Remove redundant arguments from xen_hvm_init() Eduardo Habkost
2015-08-13 11:06   ` Michael S. Tsirkin
2015-08-17 18:37     ` Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 16/18] pc: Move compat boolean globals to PCMachineClass Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 17/18] pc: Move legacy_acpi_table_size global " Eduardo Habkost
2015-08-07 19:55 ` [Qemu-devel] [PATCH for-2.5 18/18] pc: Move acpi_data_size " Eduardo Habkost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1438977359-29840-12-git-send-email-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).