qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Alexander Graf <agraf@suse.de>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Eric Auger <eric.auger@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 15:02:33 +1100	[thread overview]
Message-ID: <20141113040233.GJ7291@voom.fritz.box> (raw)
In-Reply-To: <20141024123839.GD4794@voom>

[-- Attachment #1: Type: text/plain, Size: 1883 bytes --]

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.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2014-11-13  4:05 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 [this message]
2014-11-13 13:06             ` Eric Auger

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=20141113040233.GJ7291@voom.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --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=eric.auger@linaro.org \
    --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).