]> git.ipfire.org Git - thirdparty/qemu.git/commit
s390x/sclp: fix maxram calculation
authorChristian Borntraeger <borntraeger@de.ibm.com>
Mon, 30 Jul 2018 14:09:26 +0000 (16:09 +0200)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 31 Jul 2018 16:27:16 +0000 (11:27 -0500)
commit336cd382dcf2e5de6c47a6dd185a3a563655d626
treeea80a66343eca2938335ef08d1b40cd21e37423a
parentbf1cb819e983494f2606f9d7ff0726c210a6c757
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>
(cherry picked from commit 408e5ace517ff18c9c7cd918fc93358162e6e26d)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/s390x/sclp.c