From: David Gibson <david@gibson.dropbear.id.au>
To: Alexander Graf <agraf@suse.de>
Cc: "qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
qemu-devel Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 28/58] device tree: give dt more size
Date: Fri, 16 Sep 2011 11:49:26 +1000 [thread overview]
Message-ID: <20110916014926.GX9025@yookeroo.fritz.box> (raw)
In-Reply-To: <01BC9A60-F030-4F96-ACB9-141108F4A1AD@suse.de>
On Thu, Sep 15, 2011 at 05:00:41PM +0200, Alexander Graf wrote:
>
> Am 15.09.2011 um 13:03 schrieb David Gibson <david@gibson.dropbear.id.au>:
>
> > On Thu, Sep 15, 2011 at 09:37:48AM +0200, Alexander Graf wrote:
> >>
> >> On 15.09.2011, at 05:19, David Gibson wrote:
> >>
> >>> On Wed, Sep 14, 2011 at 10:42:52AM +0200, Alexander Graf wrote:
> >>>> We currently load a device tree blob and then just take its size x2 to
> >>>> account for modifications we do inside. While this is nice and great,
> >>>> it fails when we have a small device tree as blob and lots of nodes added
> >>>> in machine init code.
> >>>>
> >>>> So for now, just make it 20k bigger than it was before. We maybe want to
> >>>> be more clever about this later.
> >>>
> >>> In fact, one of the few things I can think of that might justify
> >>> qemu's "abstraction" of the libfdt interface, is that the wrappers
> >>> could be modified to detect -FDT_ERR_NOSPACE and realloc()
> >>> appropriately.
> >>
> >> Oh, yeah, that sounds like a very good idea!
> >>
> >>> Otherwise the wrappers, which are limited and not notably simpler to
> >>> use than the raw libfdt functions seem pretty pointless to me.
> >>>
> >>> Not that I'm biased as the author of libfdt or anything :).
> >>
> >> I agree that the wrappers are not all that overly useful atm. I was
> >> actually very close to just ripping them out completely instead of
> >> extending them for new functionality. I did have the feeling that
> >> wrapping libfdt would give us a few benefits, maybe even the chance
> >> of getting rid of #ifdefs in target code.
> >
> > Hrm, maybe. Can't really see it. Of course, my preference would be
> > to get rid of those #ifdefs by embedding libfdt in qemu so it's always
> > there.
>
> It's a library and should be treated that way.
What the hell does that mean. It's a library, and things are easier
when you can count on it being there. Embedding means we can do that
without adding an external dependency. And we already use git
submodules, so that provides an easy way of embedding.
> But yeah, I'm
> inclined to fail configure for ppc when libfdt can't be found too.
>
> >> Could you please put this on your todo list? We should probably
> >> force every target code in QEMU to only use the wrappers and
> >> dynamically realloc() in them.
> >
> > Uh, sure, but it's a long list and it won't be near the top.
> >
> > The wrappers would need to be a lot more extensive to do this. I use
> > libfdt directly in the spapr code for a reason.
>
> Expensiveness is not too bad here, no? It should still be fast.
Uh, how did expensiveness get into this? I'm talking about the sheer
number of potentially useful interfaces that would have to be wrapped
with boilerplate code.
> Also, I'm perfectly fine with this being low on the list.
Also note that handling -FDT_ERR_NOSPACE only applies to write
functions. I still see little point in wrapping the read only
functions.
--
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
next prev parent reply other threads:[~2011-09-16 2:27 UTC|newest]
Thread overview: 128+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-14 8:42 [Qemu-devel] [PULL 00/58] ppc patch queue 2011-09-14 Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 01/58] spapr: proper qdevification Alexander Graf
2011-09-15 3:14 ` David Gibson
2011-09-15 7:01 ` Paolo Bonzini
2011-09-16 3:06 ` [Qemu-devel] [Qemu-ppc] " David Gibson
2011-09-16 10:41 ` Paolo Bonzini
2011-09-16 13:27 ` Thomas Huth
2011-09-16 13:28 ` Paolo Bonzini
2011-09-16 15:51 ` Benjamin Herrenschmidt
2011-09-19 6:55 ` Thomas Huth
2011-09-19 6:59 ` Paolo Bonzini
2011-09-16 14:08 ` David Gibson
2011-09-19 6:50 ` Paolo Bonzini
2011-09-14 8:42 ` [Qemu-devel] [PATCH 02/58] spapr: prepare for qdevification of irq Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 03/58] spapr: make irq customizable via qdev Alexander Graf
2011-09-15 3:15 ` David Gibson
2011-09-15 6:51 ` Paolo Bonzini
2011-09-14 8:42 ` [Qemu-devel] [PATCH 04/58] PPC: Move openpic to target specific code compilation Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 05/58] PPC: Add CPU local MMIO regions to MPIC Alexander Graf
2011-09-14 10:07 ` Peter Maydell
2011-09-14 10:11 ` Alexander Graf
2011-09-14 10:22 ` Jan Kiszka
2011-09-14 11:59 ` Avi Kivity
2011-09-14 8:42 ` [Qemu-devel] [PATCH 06/58] PPC: Extend MPIC MMIO range Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 07/58] PPC: Fix IPI support in MPIC Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 08/58] PPC: Set MPIC IDE for IPI to 0 Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 09/58] PPC: MPIC: Remove read functionality for WO registers Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 10/58] PPC: MPIC: Fix CI bit definitions Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 11/58] PPC: Bump MPIC up to 32 supported CPUs Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 12/58] PPC: E500: create multiple envs Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 13/58] PPC: E500: Generate IRQ lines for many CPUs Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 14/58] device tree: add nop_node Alexander Graf
2011-09-17 16:48 ` Blue Swirl
2011-09-19 11:22 ` Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 15/58] PPC: bamboo: Move host fdt copy to target Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 16/58] PPC: KVM: Add generic function to read host clockfreq Alexander Graf
2011-09-15 3:16 ` [Qemu-devel] [Qemu-ppc] " David Gibson
2011-09-14 8:42 ` [Qemu-devel] [PATCH 17/58] PPC: E500: Use generic kvm function for freq Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 18/58] PPC: E500: Remove mpc8544_copy_soc_cell Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 19/58] PPC: bamboo: Use kvm api for freq and clock frequencies Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 20/58] PPC: KVM: Remove kvmppc_read_host_property Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 21/58] PPC: KVM: Add stubs for kvm helper functions Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 22/58] PPC: E500: Update freqs for all CPUs Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 23/58] PPC: E500: Remove unneeded CPU nodes Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 24/58] PPC: E500: Add PV spinning code Alexander Graf
2011-09-17 16:58 ` Blue Swirl
2011-09-17 17:15 ` Alexander Graf
2011-09-17 17:40 ` Blue Swirl
2011-09-19 11:35 ` Alexander Graf
2011-09-19 16:12 ` Scott Wood
2011-09-24 7:41 ` Blue Swirl
2011-09-24 8:03 ` Alexander Graf
2011-09-24 8:44 ` Blue Swirl
2011-09-24 10:00 ` Alexander Graf
2011-09-24 10:18 ` Blue Swirl
2011-09-26 23:19 ` Scott Wood
2011-09-27 15:50 ` Blue Swirl
2011-09-27 15:59 ` Alexander Graf
2011-09-27 16:53 ` Blue Swirl
2011-09-27 17:01 ` Richard Henderson
2011-09-27 17:17 ` Blue Swirl
2011-09-27 17:19 ` Richard Henderson
2011-09-27 17:23 ` Blue Swirl
2011-09-27 17:03 ` Alexander Graf
2011-09-27 17:20 ` Blue Swirl
2011-09-27 17:23 ` Alexander Graf
2011-09-27 19:05 ` Blue Swirl
2011-09-28 7:40 ` Alexander Graf
2011-09-27 17:58 ` Scott Wood
2011-09-27 18:47 ` Blue Swirl
2011-09-14 8:42 ` [Qemu-devel] [PATCH 25/58] PPC: E500: Update cpu-release-addr property in cpu nodes Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 26/58] device tree: add add_subnode command Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 27/58] device tree: dont fail operations Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 28/58] device tree: give dt more size Alexander Graf
2011-09-15 3:19 ` [Qemu-devel] [Qemu-ppc] " David Gibson
2011-09-15 7:37 ` Alexander Graf
2011-09-15 11:03 ` David Gibson
2011-09-15 15:00 ` Alexander Graf
2011-09-16 1:49 ` David Gibson [this message]
2011-09-14 8:42 ` [Qemu-devel] [PATCH 29/58] MPC8544DS: Remove CPU nodes Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 30/58] MPC8544DS: Generate CPU nodes on init Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 31/58] PPC: E500: Bump CPU count to 15 Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 32/58] PPC: Add new target config for pseries Alexander Graf
2011-09-15 3:20 ` [Qemu-devel] [Qemu-ppc] " David Gibson
2011-09-14 8:42 ` [Qemu-devel] [PATCH 33/58] KVM: update kernel headers Alexander Graf
2011-09-17 16:59 ` Blue Swirl
2011-09-17 17:17 ` Alexander Graf
2011-09-19 17:50 ` [Qemu-devel] [Qemu-ppc] " Scott Wood
2011-09-19 17:50 ` Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 34/58] PPC: Enable to use PAPR with PR style KVM Alexander Graf
2011-09-14 8:42 ` [Qemu-devel] [PATCH 35/58] PPC: SPAPR: Use KVM function for time info Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 36/58] pseries: Bugfixes for interrupt numbering in XICS code Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 37/58] pseries: Add a phandle to the xicp interrupt controller device tree node Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 38/58] pseries: interrupt controller should not have a 'reg' property Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 39/58] pseries: More complete WIMG validation in H_ENTER code Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 40/58] PPC: Fix sync instructions problem in SMP Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 41/58] pseries: Add real mode debugging hcalls Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 42/58] pseries: use macro for firmware filename Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 43/58] KVM: Update kernel headers Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 44/58] kvm: ppc: booke206: use MMU API Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 45/58] ppc: booke206: add "info tlb" support Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 46/58] ppc: booke206: use MAV=2.0 TSIZE definition, fix 4G pages Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 47/58] Implement POWER7's CFAR in TCG Alexander Graf
2011-09-17 17:08 ` Blue Swirl
2011-09-19 6:00 ` [Qemu-devel] [Qemu-ppc] " David Gibson
2011-09-19 6:47 ` Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 48/58] pseries: Implement hcall-bulk hypervisor interface Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 49/58] vscsi: send the CHECK_CONDITION status down together with autosense data Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 50/58] pseries: Update SLOF firmware image Alexander Graf
2011-09-14 11:01 ` Peter Maydell
2011-09-14 12:24 ` Alexander Graf
2011-09-14 12:28 ` Peter Maydell
2011-09-14 12:59 ` Anthony Liguori
2011-09-14 20:17 ` Blue Swirl
2011-09-19 8:32 ` Alexander Graf
2011-09-20 3:40 ` [Qemu-devel] [Qemu-ppc] " David Gibson
2011-09-24 12:45 ` Paolo Bonzini
2011-09-27 1:01 ` David Gibson
2011-09-27 6:39 ` Alexander Graf
2011-09-29 4:21 ` David Gibson
2011-09-14 8:43 ` [Qemu-devel] [PATCH 51/58] Gdbstub: handle read of fpscr Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 52/58] ppc405: use RAM_ADDR_FMT instead of %08lx Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 53/58] openpic: Unfold read_IRQreg Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 54/58] openpic: Unfold write_IRQreg Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 55/58] ppc: move ADB stuff from ppc_mac.h to adb.h Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 56/58] PPC: Fix via-cuda memory registration Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 57/58] PPC: Fix heathrow PIC to use little endian MMIO Alexander Graf
2011-09-14 8:43 ` [Qemu-devel] [PATCH 58/58] KVM: Update kernel headers Alexander Graf
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=20110916014926.GX9025@yookeroo.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).