summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2018-07-30 16:09:26 +0200
committerCornelia Huck <cohuck@redhat.com>2018-07-30 17:41:52 +0200
commit408e5ace517ff18c9c7cd918fc93358162e6e26d (patch)
tree04a95729e9d47877becb95057dc02a61aaabc144 /hw
parent18a398f6a39df4b08ff86ac0d38384193ca5f4cc (diff)
downloadqemu-408e5ace517ff18c9c7cd918fc93358162e6e26d.zip
s390x/sclp: fix maxram calculation
We clamp down ram_size to match the sclp increment size. We do not do the same for maxram_size, which means for large guests with some sizes (e.g. -m 50000) maxram_size differs from ram_size. This can break other code (e.g. CMMA migration) which uses maxram_size to calculate the number of pages and then throws some errors. Fixes: 82fab5c5b90e468f3e9d54c ("s390x/sclp: remove memory hotplug support") Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> CC: qemu-stable@nongnu.org CC: David Hildenbrand <david@redhat.com> Message-Id: <1532959766-53343-1-git-send-email-borntraeger@de.ibm.com> Reviewed-by: David Hildenbrand <david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/s390x/sclp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index bd2a024efd..4510a800cb 100644
--- a/hw/s390x/sclp.c
+++ b/hw/s390x/sclp.c
@@ -320,6 +320,7 @@ static void sclp_memory_init(SCLPDevice *sclp)
initial_mem = initial_mem >> increment_size << increment_size;
machine->ram_size = initial_mem;
+ machine->maxram_size = initial_mem;
/* let's propagate the changed ram size into the global variable. */
ram_size = initial_mem;
}