cryptospore / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone
0a122b
From c097095019b643c2212037eb98c150650931284e Mon Sep 17 00:00:00 2001
0a122b
From: Eduardo Habkost <ehabkost@redhat.com>
0a122b
Date: Tue, 11 Feb 2014 14:03:47 +0100
0a122b
Subject: [PATCH 11/28] pc: Save size of RAM below 4GB
0a122b
0a122b
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
0a122b
Message-id: <1392127428-9286-2-git-send-email-ehabkost@redhat.com>
0a122b
Patchwork-id: 57204
0a122b
O-Subject: [PATCH 1/2] pc: Save size of RAM below 4GB
0a122b
Bugzilla: 1048080
0a122b
RH-Acked-by: Marcel Apfelbaum <marcel.a@redhat.com>
0a122b
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
0a122b
RH-Acked-by: Michael S. Tsirkin <mst@redhat.com>
0a122b
0a122b
Bugzilla: 1048080
0a122b
Brew scratch build: http://brewweb.devel.redhat.com/brew/taskinfo?taskID=7027865
0a122b
0a122b
The ram_below_4g value will be useful in other places, such as the ACPI
0a122b
table code, and other code that currently requires passing
0a122b
below_4g_mem_size around in function arguments.
0a122b
0a122b
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
0a122b
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
0a122b
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
0a122b
(cherry picked from commit f30ee8a9682be4abfcb05c6389894f8cfc35c3f0)
0a122b
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
0a122b
---
0a122b
 hw/i386/pc.c         | 1 +
0a122b
 include/hw/i386/pc.h | 2 +-
0a122b
 2 files changed, 2 insertions(+), 1 deletion(-)
0a122b
0a122b
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
0a122b
---
0a122b
 hw/i386/pc.c         |    1 +
0a122b
 include/hw/i386/pc.h |    2 +-
0a122b
 2 files changed, 2 insertions(+), 1 deletions(-)
0a122b
0a122b
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
0a122b
index a0f0b24..1468d50 100644
0a122b
--- a/hw/i386/pc.c
0a122b
+++ b/hw/i386/pc.c
0a122b
@@ -1046,6 +1046,7 @@ PcGuestInfo *pc_guest_info_init(ram_addr_t below_4g_mem_size,
0a122b
     PcGuestInfo *guest_info = &guest_info_state->info;
0a122b
     int i, j;
0a122b
 
0a122b
+    guest_info->ram_size_below_4g = below_4g_mem_size;
0a122b
     guest_info->ram_size = below_4g_mem_size + above_4g_mem_size;
0a122b
     guest_info->apic_id_limit = pc_apic_id_limit(max_cpus);
0a122b
     guest_info->apic_xrupt_override = kvm_allows_irq0_override();
0a122b
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
0a122b
index 413358f..f56e9ea 100644
0a122b
--- a/include/hw/i386/pc.h
0a122b
+++ b/include/hw/i386/pc.h
0a122b
@@ -35,7 +35,7 @@ typedef struct PcPciInfo {
0a122b
 struct PcGuestInfo {
0a122b
     bool has_pci_info;
0a122b
     bool isapc_ram_fw;
0a122b
-    hwaddr ram_size;
0a122b
+    hwaddr ram_size, ram_size_below_4g;
0a122b
     unsigned apic_id_limit;
0a122b
     bool apic_xrupt_override;
0a122b
     uint64_t numa_nodes;
0a122b
-- 
0a122b
1.7.1
0a122b