qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: Igor Mammedov <imammedo@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: [Qemu-devel] [PATCH 1/2] pc: Save size of RAM below 4GB
Date: Thu,  9 Jan 2014 17:12:42 -0200	[thread overview]
Message-ID: <1389294763-8137-2-git-send-email-ehabkost@redhat.com> (raw)
In-Reply-To: <1389294763-8137-1-git-send-email-ehabkost@redhat.com>

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 <ehabkost@redhat.com>
---
 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

  reply	other threads:[~2014-01-09 19:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-09 19:12 [Qemu-devel] [PATCH 0/2] acpi: Fix PCI hole handling on SRAT table Eduardo Habkost
2014-01-09 19:12 ` Eduardo Habkost [this message]
2014-01-09 19:12 ` [Qemu-devel] [PATCH 2/2] acpi: Fix PCI hole handling on build_srat() Eduardo Habkost
2014-01-09 20:33 ` [Qemu-devel] [PATCH 0/2] acpi: Fix PCI hole handling on SRAT table Laszlo Ersek
2014-01-10 15:17 ` Igor Mammedov
2014-01-10 15:59   ` Eduardo Habkost
2014-01-13 10:54 ` Gerd Hoffmann
2014-01-24 17:31 ` Eduardo Habkost
2014-01-26  9:25 ` Michael S. Tsirkin

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=1389294763-8137-2-git-send-email-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=imammedo@redhat.com \
    --cc=kraxel@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).