From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:43587) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UX9IL-0005gX-DE for qemu-devel@nongnu.org; Tue, 30 Apr 2013 08:04:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UX9IJ-0002S5-Qm for qemu-devel@nongnu.org; Tue, 30 Apr 2013 08:04:29 -0400 Message-ID: <517FB349.2080605@suse.de> Date: Tue, 30 Apr 2013 14:04:25 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <1367145009-14512-1-git-send-email-tiejun.chen@windriver.com> <1367263124.32182.7@snotra> <817F25B8-8CB1-48FD-9FE6-2E6635998494@suse.de> In-Reply-To: <817F25B8-8CB1-48FD-9FE6-2E6635998494@suse.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-ppc] [v1][PATCH 1/1] PPC: e500: correct params->ram_size with ram_size List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alexander Graf Cc: Scott Wood , Tiejun Chen , qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Igor Mammedov Am 30.04.2013 11:53, schrieb Alexander Graf: >=20 > On 29.04.2013, at 21:18, Scott Wood wrote: >=20 >> On 04/28/2013 05:30:09 AM, Tiejun Chen wrote: >>> We should sync params->ram_size after we fixup memory size on >>> a alignment boundary. Otherwise Guest would exceed the actual >>> memory region. >>> Signed-off-by: Tiejun Chen >>> --- >>> hw/ppc/e500.c | 2 ++ >>> 1 file changed, 2 insertions(+) >>> diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c >>> index c1bdb6b..145da0e 100644 >>> --- a/hw/ppc/e500.c >>> +++ b/hw/ppc/e500.c >>> @@ -523,6 +523,8 @@ void ppce500_init(PPCE500Params *params) >>> /* Fixup Memory size on a alignment boundary */ >>> ram_size &=3D ~(RAM_SIZES_ALIGN - 1); >>> + /* Sync this for the system. */ >>> + params->ram_size =3D ram_size; >> >> Could you explain this further? When does params->ram_size ever get u= sed after this point? >=20 > This is the respective code in vl.c: >=20 >> QEMUMachineInitArgs args =3D { .ram_size =3D ram_size, >> .boot_device =3D (boot_devices[0] =3D= =3D '\0') ? >> machine->boot_order : >> boot_devices, >> .kernel_filename =3D kernel_filename, >> .kernel_cmdline =3D kernel_cmdline, >> .initrd_filename =3D initrd_filename, >> .cpu_model =3D cpu_model }; >> machine->init(&args); >=20 >=20 > After this, args in unused. So as you can see, params->ram_size never g= ets used after it's read once. While that is true, it was being discussed to update cpu_model inside QEMUMachineInitArgs FWIW. That's independent of PPCE500Params though. Andreas > What bug are you trying to fix? Maybe there really is something broken = here, that this patch doesn't fix either. >=20 >=20 > Alex --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg