From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:36303) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tak83-0006JU-AP for qemu-devel@nongnu.org; Tue, 20 Nov 2012 04:28:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tak7x-0006lS-Fz for qemu-devel@nongnu.org; Tue, 20 Nov 2012 04:28:27 -0500 Received: from e06smtp15.uk.ibm.com ([195.75.94.111]:42723) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tak7x-0006l2-75 for qemu-devel@nongnu.org; Tue, 20 Nov 2012 04:28:21 -0500 Received: from /spool/local by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 20 Nov 2012 09:28:20 -0000 Received: from d06av02.portsmouth.uk.ibm.com (d06av02.portsmouth.uk.ibm.com [9.149.37.228]) by b06cxnps4075.portsmouth.uk.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id qAK9SA7t44236964 for ; Tue, 20 Nov 2012 09:28:10 GMT Received: from d06av02.portsmouth.uk.ibm.com (loopback [127.0.0.1]) by d06av02.portsmouth.uk.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id qAK9SHSo008708 for ; Tue, 20 Nov 2012 02:28:18 -0700 From: Christian Borntraeger Date: Tue, 20 Nov 2012 10:28:34 +0100 Message-Id: <1353403714-3093-1-git-send-email-borntraeger@de.ibm.com> In-Reply-To: References: Subject: [Qemu-devel] [PATCH 1/1] s390: Fix ram_size updating in machine init List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Christian Borntraeger , Heinz Graalfs , qemu-devel From: Heinz Graalfs The global variable 'ram_size' is hidden by the local variable declaration in s390_init(). Since we want to update the global ram size in certain cases we must not use a local ram_size variable. - This fixes booting with unusual ram sizes like -m 67001 - This changes behaviour back to the situation before commit 5f072e1f3075bd869e0ace9f2545a85992ac0084 (create struct for machine initialization arguments) Signed-off-by: Heinz Graalfs Reviewed-by: Eduardo Habkost Signed-off-by: Christian Borntraeger --- hw/s390-virtio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/s390-virtio.c b/hw/s390-virtio.c index ebec844..78477af 100644 --- a/hw/s390-virtio.c +++ b/hw/s390-virtio.c @@ -155,7 +155,6 @@ unsigned s390_del_running_cpu(CPUS390XState *env) static void s390_init(QEMUMachineInitArgs *args) { ram_addr_t my_ram_size = args->ram_size; - ram_addr_t ram_size = args->ram_size; const char *cpu_model = args->cpu_model; const char *kernel_filename = args->kernel_filename; const char *kernel_cmdline = args->kernel_cmdline; -- 1.7.10.1