|
|
9ae3a8 |
From 6a2046866f4e057da661d496fc8014e5bca0d44e Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
Date: Thu, 16 Jan 2014 10:25:59 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 03/14] q35: gigabyle alignment for ram
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1389867959-12463-5-git-send-email-kraxel@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 56746
|
|
|
9ae3a8 |
O-Subject: [RHEL-7 qemu-kvm PATCH 4/4] q35: gigabyle alignment for ram
|
|
|
9ae3a8 |
Bugzilla: 1026548
|
|
|
9ae3a8 |
RH-Acked-by: Laszlo Ersek <lersek@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Map 2G of memory below 4G, so the two RAM pieces are nicely
|
|
|
9ae3a8 |
aligned to gigabyte borders.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Keep old memory layout for in case all memory fits below 4G and
|
|
|
9ae3a8 |
thus we don't have to split RAM into pieces in the first place.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
upstream: Not yet. Planned, but want sort mmconf bar issues first.
|
|
|
9ae3a8 |
Put into rhel7 nevertheless to make life simpler for rhel8
|
|
|
9ae3a8 |
(i.e. no need to support gigabyte alignment the rhel6 way).
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/i386/pc_q35.c | 6 ++++--
|
|
|
9ae3a8 |
1 file changed, 4 insertions(+), 2 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
hw/i386/pc_q35.c | 6 ++++--
|
|
|
9ae3a8 |
1 files changed, 4 insertions(+), 2 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
|
|
|
9ae3a8 |
index 232c62d..7e46799 100644
|
|
|
9ae3a8 |
--- a/hw/i386/pc_q35.c
|
|
|
9ae3a8 |
+++ b/hw/i386/pc_q35.c
|
|
|
9ae3a8 |
@@ -51,6 +51,7 @@
|
|
|
9ae3a8 |
static bool smbios_type1_defaults = true;
|
|
|
9ae3a8 |
static bool has_pci_info;
|
|
|
9ae3a8 |
static bool has_acpi_build = true;
|
|
|
9ae3a8 |
+static bool gigabyte_align = true;
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
/* PC hardware initialisation */
|
|
|
9ae3a8 |
static void pc_q35_init(QEMUMachineInitArgs *args)
|
|
|
9ae3a8 |
@@ -87,8 +88,9 @@ static void pc_q35_init(QEMUMachineInitArgs *args)
|
|
|
9ae3a8 |
kvmclock_create();
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
if (args->ram_size >= 0xb0000000) {
|
|
|
9ae3a8 |
- above_4g_mem_size = args->ram_size - 0xb0000000;
|
|
|
9ae3a8 |
- below_4g_mem_size = 0xb0000000;
|
|
|
9ae3a8 |
+ ram_addr_t lowmem = gigabyte_align ? 0x80000000 : 0xb0000000;
|
|
|
9ae3a8 |
+ above_4g_mem_size = args->ram_size - lowmem;
|
|
|
9ae3a8 |
+ below_4g_mem_size = lowmem;
|
|
|
9ae3a8 |
} else {
|
|
|
9ae3a8 |
above_4g_mem_size = 0;
|
|
|
9ae3a8 |
below_4g_mem_size = args->ram_size;
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|