Skip to content
Snippets Groups Projects
Commit 408e5ace authored by Christian Borntraeger's avatar Christian Borntraeger Committed by Cornelia Huck
Browse files

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: 82fab5c5 ("s390x/sclp: remove memory hotplug support")
Signed-off-by: default avatarChristian 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: default avatarDavid Hildenbrand <david@redhat.com>
Signed-off-by: default avatarCornelia Huck <cohuck@redhat.com>
parent 18a398f6
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment