|
|
ae23c9 |
From 619064cd5e5f275a0d61fcd05855b1598c2d654b Mon Sep 17 00:00:00 2001
|
|
|
ae23c9 |
From: Cornelia Huck <cohuck@redhat.com>
|
|
|
ae23c9 |
Date: Wed, 1 Aug 2018 11:09:14 +0200
|
|
|
ae23c9 |
Subject: [PATCH 267/268] s390x/sclp: fix maxram calculation
|
|
|
ae23c9 |
|
|
|
ae23c9 |
RH-Author: Cornelia Huck <cohuck@redhat.com>
|
|
|
ae23c9 |
Message-id: <20180801110914.17729-1-cohuck@redhat.com>
|
|
|
ae23c9 |
Patchwork-id: 81564
|
|
|
ae23c9 |
O-Subject: [RHEL-7.6 qemu-kvm-ma PATCH] s390x/sclp: fix maxram calculation
|
|
|
ae23c9 |
Bugzilla: 1595740
|
|
|
ae23c9 |
RH-Acked-by: David Hildenbrand <david@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
ae23c9 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
From: Christian Borntraeger <borntraeger@de.ibm.com>
|
|
|
ae23c9 |
|
|
|
ae23c9 |
We clamp down ram_size to match the sclp increment size. We do
|
|
|
ae23c9 |
not do the same for maxram_size, which means for large guests
|
|
|
ae23c9 |
with some sizes (e.g. -m 50000) maxram_size differs from ram_size.
|
|
|
ae23c9 |
This can break other code (e.g. CMMA migration) which uses maxram_size
|
|
|
ae23c9 |
to calculate the number of pages and then throws some errors.
|
|
|
ae23c9 |
|
|
|
ae23c9 |
Fixes: 82fab5c5b90e468f3e9d54c ("s390x/sclp: remove memory hotplug support")
|
|
|
ae23c9 |
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
|
|
|
ae23c9 |
CC: qemu-stable@nongnu.org
|
|
|
ae23c9 |
CC: David Hildenbrand <david@redhat.com>
|
|
|
ae23c9 |
Message-Id: <1532959766-53343-1-git-send-email-borntraeger@de.ibm.com>
|
|
|
ae23c9 |
Reviewed-by: David Hildenbrand <david@redhat.com>
|
|
|
ae23c9 |
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
ae23c9 |
(cherry picked from commit 408e5ace517ff18c9c7cd918fc93358162e6e26d)
|
|
|
ae23c9 |
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
ae23c9 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
ae23c9 |
---
|
|
|
ae23c9 |
hw/s390x/sclp.c | 1 +
|
|
|
ae23c9 |
1 file changed, 1 insertion(+)
|
|
|
ae23c9 |
|
|
|
ae23c9 |
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
|
|
|
ae23c9 |
index 047d577..2abdb62 100644
|
|
|
ae23c9 |
--- a/hw/s390x/sclp.c
|
|
|
ae23c9 |
+++ b/hw/s390x/sclp.c
|
|
|
ae23c9 |
@@ -319,6 +319,7 @@ static void sclp_memory_init(SCLPDevice *sclp)
|
|
|
ae23c9 |
initial_mem = initial_mem >> increment_size << increment_size;
|
|
|
ae23c9 |
|
|
|
ae23c9 |
machine->ram_size = initial_mem;
|
|
|
ae23c9 |
+ machine->maxram_size = initial_mem;
|
|
|
ae23c9 |
/* let's propagate the changed ram size into the global variable. */
|
|
|
ae23c9 |
ram_size = initial_mem;
|
|
|
ae23c9 |
}
|
|
|
ae23c9 |
--
|
|
|
ae23c9 |
1.8.3.1
|
|
|
ae23c9 |
|