From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50383) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fkA8r-0003gb-Lm for qemu-devel@nongnu.org; Mon, 30 Jul 2018 11:31:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fkA8o-0002XM-Ul for qemu-devel@nongnu.org; Mon, 30 Jul 2018 11:31:25 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:43072) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fkA8o-0002Wu-J7 for qemu-devel@nongnu.org; Mon, 30 Jul 2018 11:31:22 -0400 Received: from pps.filterd (m0098404.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w6UFSx3O024187 for ; Mon, 30 Jul 2018 11:31:21 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kj340ya5v-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 30 Jul 2018 11:31:21 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 30 Jul 2018 16:31:18 +0100 References: <1532959766-53343-1-git-send-email-borntraeger@de.ibm.com> From: Christian Borntraeger Date: Mon, 30 Jul 2018 17:31:12 +0200 MIME-Version: 1.0 In-Reply-To: <1532959766-53343-1-git-send-email-borntraeger@de.ibm.com> Content-Language: en-US Message-Id: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 1/1] s390x/sclp: fix maxram calculation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Cornelia Huck Cc: qemu-devel , qemu-s390x , Alexander Graf , Thomas Huth , David Hildenbrand , Richard Henderson , Janosch Frank , Halil Pasic , imbrenda@linux.vnet.ibm.com, qemu-stable@nongnu.org, Michael Roth Are we still able to get things into 2.12.1 or are we too late? On 07/30/2018 04:09 PM, Christian Borntraeger wrote: > 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 > CC: qemu-stable@nongnu.org > CC: David Hildenbrand > --- > 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; > } >