From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz8Nc-0008Qz-5k for qemu-devel@nongnu.org; Mon, 23 Jun 2014 13:50:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wz8NV-000105-HG for qemu-devel@nongnu.org; Mon, 23 Jun 2014 13:50:08 -0400 Received: from fldsmtpe04.verizon.com ([140.108.26.143]:55940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wz8NV-0000zO-E1 for qemu-devel@nongnu.org; Mon, 23 Jun 2014 13:50:01 -0400 From: Don Slutz Message-ID: <53A868C2.10702@terremark.com> Date: Mon, 23 Jun 2014 13:49:54 -0400 MIME-Version: 1.0 References: <1403228426-7609-1-git-send-email-dslutz@verizon.com> <1403228426-7609-3-git-send-email-dslutz@verizon.com> <20140623145948.GA5450@redhat.com> In-Reply-To: <20140623145948.GA5450@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2.1 v7 2/3] pc & q35: Add new machine opt max-ram-below-4g List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , Don Slutz Cc: xen-devel@lists.xensource.com, Stefano Stabellini , Marcel Apfelbaum , qemu-devel@nongnu.org, Anthony Liguori , Igor Mammedov , =?ISO-8859-1?Q?Andreas_F=E4rber?= On 06/23/14 10:59, Michael S. Tsirkin wrote: > On Thu, Jun 19, 2014 at 09:40:25PM -0400, Don Slutz wrote: >> This is a pc & q35 only machine opt. >> ... >> >> static void pc_machine_initfn(Object *obj) >> { >> + PCMachineState *pcms = PC_MACHINE(obj); >> + >> object_property_add(obj, PC_MACHINE_MEMHP_REGION_SIZE, "int", >> pc_machine_get_hotplug_memory_region_size, >> NULL, NULL, NULL, NULL); >> + pcms->max_ram_below_4g = 1UL << 32; /* 4G */ > This is a bug: should be 1ULL. Fixed it up locally. Yes. Thanks for fixing it. My 64bit system's gcc: dcs-xen-54:~/qemu>gcc --version gcc (GCC) 4.7.2 20120921 (Red Hat 4.7.2-2) Copyright (C) 2012 Free Software Foundation, Inc. Gets this wrong generating 32bit code :( -Don Slutz >> + object_property_add(obj, PC_MACHINE_MAX_RAM_BELOW_4G, "size", >> + pc_machine_get_max_ram_below_4g, >> + pc_machine_set_max_ram_below_4g, >> + NULL, NULL, NULL); >> }