All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 1/1] s390x/sclp: fix maxram calculation
@ 2018-07-30 14:09 Christian Borntraeger
  2018-07-30 14:34 ` David Hildenbrand
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Christian Borntraeger @ 2018-07-30 14:09 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: qemu-devel, qemu-s390x, Alexander Graf, Thomas Huth,
	David Hildenbrand, Richard Henderson, Janosch Frank, Halil Pasic,
	imbrenda, Christian Borntraeger

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>
---
 hw/s390x/sclp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index bd2a024..4510a80 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;
 }
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2018-07-31 10:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-30 14:09 [Qemu-devel] [PATCH 1/1] s390x/sclp: fix maxram calculation Christian Borntraeger
2018-07-30 14:34 ` David Hildenbrand
2018-07-30 15:00   ` [Qemu-devel] [qemu-s390x] " Christian Borntraeger
2018-07-30 15:17     ` David Hildenbrand
2018-07-30 15:20       ` Christian Borntraeger
2018-07-30 15:28         ` David Hildenbrand
2018-07-30 15:32         ` Cornelia Huck
2018-07-30 15:31 ` [Qemu-devel] " Christian Borntraeger
2018-07-30 16:58   ` Michael Roth
2018-07-31  6:52     ` Cornelia Huck
2018-07-31 10:48       ` Cornelia Huck
2018-07-30 15:43 ` David Hildenbrand
2018-07-30 15:47   ` Cornelia Huck
2018-07-31  8:34     ` [Qemu-devel] [qemu-s390x] " David Hildenbrand
2018-07-30 15:55 ` [Qemu-devel] " Cornelia Huck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.