From: Eric Auger <eric.auger@linaro.org>
To: David Gibson <david@gibson.dropbear.id.au>,
Alexander Graf <agraf@suse.de>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
qemu list <qemu-devel@nongnu.org>,
Alex Williamson <alex.williamson@redhat.com>,
Antonios Motakis <a.motakis@virtualopensystems.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Christoffer Dall <christoffer.dall@linaro.org>
Subject: Re: [Qemu-devel] dynamic sysbus instantiation and load_dtb implementation
Date: Thu, 13 Nov 2014 14:06:11 +0100 [thread overview]
Message-ID: <5464ACC3.5060204@linaro.org> (raw)
In-Reply-To: <20141113040233.GJ7291@voom.fritz.box>
On 11/13/2014 05:02 AM, David Gibson wrote:
> On Fri, Oct 24, 2014 at 02:38:39PM +0200, David Gibson wrote:
>> On Thu, Oct 23, 2014 at 01:26:08PM +0200, Alexander Graf wrote:
>>>
>>>
>>> On 23.10.14 13:24, Peter Maydell wrote:
>>>> On 23 October 2014 12:23, Alexander Graf <agraf@suse.de> wrote:
>>>>> On 23.10.14 12:19, Ard Biesheuvel wrote:
>>>>>> The reason for this change was that, before, the DTB would only be
>>>>>> generated once, and after a reset, the machine would go through the
>>>>>> kernel boot protocol as before but the DTB pointer would point to
>>>>>> garbage. Any idea how ppc deals with this? Do they recreate the device
>>>>>> tree after each reset?
>>>>>
>>>>> Yes, we regenerate the device tree on each reset.
>>>>
>>>> Any particular reason? Surely it's always the same...
>>>
>>> We have the code in place anyway, it's not a performance critical code
>>> path and putting it into a rom would be a waste of RAM, as it'd keep yet
>>> another copy of something we can easily regenerate.
>>>
>>> It's a matter of personal preference I guess.
>>
>> The "pseries" machine actually uses an odd hybrid. We create a
>> "template" device tree with the common portions during early init.
>> That's stored permanently, but is not guest visible.
>>
>> At reset time we augment the template with information which could
>> very from one boot to another, then copy it into RAM for the SLOF
>> firmware to read.
>>
>> It's not particularly efficient, but really, who cares. It's once per
>> resent, and we're generally talking at most a few dozen kiB of device
>> tree.
>
> Oh, also, because we potentially have hotplug of VIO devices, it's
> *not* necessarily the same every time.
>
Thanks for your inputs. I eventually proposed an implementation based on
machine init done notifier, still using rom_add_blob_fixed.
http://lists.nongnu.org/archive/html/qemu-devel/2014-10/msg03812.html
By the way, besides Alex, did anyone have time to review modifs in
hw/arm/boot.c and overall process to enhance the original device tree?
Are those modifications acceptable?
Thank you in advance
Best Regards
Eric
prev parent reply other threads:[~2014-11-13 13:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-23 10:10 [Qemu-devel] dynamic sysbus instantiation and load_dtb implementation Eric Auger
2014-10-23 10:14 ` Alexander Graf
2014-10-23 10:19 ` Ard Biesheuvel
2014-10-23 11:23 ` Alexander Graf
2014-10-23 11:24 ` Peter Maydell
2014-10-23 11:26 ` Alexander Graf
2014-10-23 11:41 ` Eric Auger
2014-10-23 12:41 ` Eric Auger
2014-10-24 12:38 ` David Gibson
2014-11-13 4:02 ` David Gibson
2014-11-13 13:06 ` Eric Auger [this message]
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=5464ACC3.5060204@linaro.org \
--to=eric.auger@linaro.org \
--cc=a.motakis@virtualopensystems.com \
--cc=agraf@suse.de \
--cc=alex.williamson@redhat.com \
--cc=ard.biesheuvel@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=david@gibson.dropbear.id.au \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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).