qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Alexander Graf <agraf@suse.de>
Cc: Scott Wood <scottwood@freescale.com>,
	Tiejun Chen <tiejun.chen@windriver.com>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Igor Mammedov <imammedo@redhat.com>
Subject: Re: [Qemu-devel] [Qemu-ppc] [v1][PATCH 1/1] PPC: e500: correct params->ram_size with ram_size
Date: Tue, 30 Apr 2013 14:04:25 +0200	[thread overview]
Message-ID: <517FB349.2080605@suse.de> (raw)
In-Reply-To: <817F25B8-8CB1-48FD-9FE6-2E6635998494@suse.de>

Am 30.04.2013 11:53, schrieb Alexander Graf:
> 
> On 29.04.2013, at 21:18, Scott Wood wrote:
> 
>> 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 <tiejun.chen@windriver.com>
>>> ---
>>> 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 &= ~(RAM_SIZES_ALIGN - 1);
>>> +    /* Sync this for the system. */
>>> +    params->ram_size = ram_size;
>>
>> Could you explain this further?  When does params->ram_size ever get used after this point?
> 
> This is the respective code in vl.c:
> 
>>     QEMUMachineInitArgs args = { .ram_size = ram_size,
>>                                  .boot_device = (boot_devices[0] == '\0') ?
>>                                                 machine->boot_order :
>>                                                 boot_devices,
>>                                  .kernel_filename = kernel_filename,
>>                                  .kernel_cmdline = kernel_cmdline,
>>                                  .initrd_filename = initrd_filename,
>>                                  .cpu_model = cpu_model };
>>     machine->init(&args);
> 
> 
> After this, args in unused. So as you can see, params->ram_size never gets 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.
> 
> 
> Alex

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

  reply	other threads:[~2013-04-30 12:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-28 10:30 [Qemu-devel] [v1][Qemu-ppc][PATCH 1/1] PPC: e500: correct params->ram_size with ram_size Tiejun Chen
2013-04-29 19:18 ` [Qemu-devel] [Qemu-ppc] [v1][PATCH " Scott Wood
2013-04-30  9:53   ` Alexander Graf
2013-04-30 12:04     ` Andreas Färber [this message]
2013-04-30 23:54     ` Chen, Tiejun
2013-05-01  0:29       ` Alexander Graf
2013-04-30 23:03   ` Chen, Tiejun
2013-04-30 23:08     ` Scott Wood
2013-04-30 23:31       ` Chen, Tiejun
2013-04-30 23:36         ` Scott Wood
2013-04-30 23:46           ` Chen, Tiejun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=517FB349.2080605@suse.de \
    --to=afaerber@suse.de \
    --cc=agraf@suse.de \
    --cc=imammedo@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=scottwood@freescale.com \
    --cc=tiejun.chen@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).