From: Peter Maydell <peter.maydell@linaro.org>
To: Anthony Liguori <anthony@codemonkey.ws>
Cc: "Igor Mammedov" <imammedo@redhat.com>,
agraf@suse.de, qemu-devel@nongnu.org,
"Andreas Färber" <afaerber@suse.de>,
"David Gibson" <david@gibson.dropbear.id.au>
Subject: Re: [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence
Date: Fri, 3 Aug 2012 15:35:11 +0100 [thread overview]
Message-ID: <CAFEAcA-e97V_iGvv69f2RfRPnKyyrpx13xA10MvcMRe-40-xNA@mail.gmail.com> (raw)
In-Reply-To: <87wr1gnjhk.fsf@codemonkey.ws>
On 3 August 2012 15:22, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Peter Maydell <peter.maydell@linaro.org> writes:
>> On 3 August 2012 14:50, Anthony Liguori <anthony@codemonkey.ws> wrote:
>>> There ought to be a hierarchy (based on composition) that reset flows
>>> through.
>>
>> I think saying "the reset tree is isomorphic to the composition tree"
>> is making the same mistake that qbus did with "the bus tree is
>> isomorphic to the composition tree". The stakes are lower for reset
>> and we can probably get away with it, but it really isn't how the
>> hardware works...
>
> It flows through the composition tree by default, but can be overridden
> at any point.
That doesn't let you model situations where reset doesn't start at
the root of the tree, though. (eg, reset controller wants to trigger
a reset of just the CPUs, or of CPUs + board devices).
> So this model should work very well for most types of virtual hardware.
> But it doesn't provide for a mechanism to "after all devices are
> initialized, build FDT in guest memory, then set the CPU registers to
> point to it".
>
> There's no logical device that has a scope like that that also has the
> mechanism to get that type of hook in the reset path. That's why we
> need to have the QEMUMachine::reset() hook.
Yeah, I see the need, but I wonder if calling it 'reset' is confusing:
maybe it should be 'post-reset', 'post-realize' or something?
The arm_boot code needs to do set up and run at this point too.
The other oddball case for reset is ARM M-profile cores, where the
initial PC is read from a vector table at reset rather than being
a fixed value. At the moment the mechanism we use for this is deeply
hacky: some more generic mechanism for "do this when we come out of
reset but before starting to execute" might be useful there.
-- PMM
next prev parent reply other threads:[~2012-08-03 14:35 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-02 2:10 [Qemu-devel] [0/2] Allow machine to control ordering of reset David Gibson
2012-08-02 2:10 ` [Qemu-devel] [PATCH 1/2] Allow QEMUMachine to override reset sequencing David Gibson
2012-08-02 2:37 ` Anthony Liguori
2012-08-02 3:50 ` Benjamin Herrenschmidt
2012-08-02 15:17 ` Paolo Bonzini
2012-08-02 20:46 ` Benjamin Herrenschmidt
2012-08-02 20:58 ` Anthony Liguori
2012-08-03 2:54 ` David Gibson
2012-08-03 3:08 ` David Gibson
2012-08-02 15:00 ` Lluís Vilanova
2012-08-03 2:25 ` David Gibson
2012-08-02 2:10 ` [Qemu-devel] [PATCH 2/2] pseries: Use new hook to correct reset sequence David Gibson
2012-08-02 15:44 ` Andreas Färber
2012-08-02 18:29 ` Anthony Liguori
2012-08-02 18:38 ` Andreas Färber
2012-08-02 19:40 ` Anthony Liguori
2012-08-03 2:37 ` David Gibson
2012-08-03 13:50 ` Anthony Liguori
2012-08-03 13:57 ` Peter Maydell
2012-08-03 14:22 ` Anthony Liguori
2012-08-03 14:35 ` Peter Maydell [this message]
2012-08-03 14:51 ` Andreas Färber
2012-08-03 15:01 ` Andreas Färber
2012-08-03 16:21 ` Anthony Liguori
2012-08-07 22:02 ` Benjamin Herrenschmidt
2012-08-07 22:32 ` Andreas Färber
2012-08-08 0:00 ` Anthony Liguori
2012-08-08 7:58 ` Peter Maydell
2012-08-08 8:44 ` David Gibson
2012-08-08 1:45 ` David Gibson
2012-08-08 15:22 ` Andreas Färber
2012-08-09 0:12 ` David Gibson
2012-08-03 2:31 ` David Gibson
2012-08-03 15:13 ` Andreas Färber
2012-08-06 0:31 ` David Gibson
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=CAFEAcA-e97V_iGvv69f2RfRPnKyyrpx13xA10MvcMRe-40-xNA@mail.gmail.com \
--to=peter.maydell@linaro.org \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--cc=anthony@codemonkey.ws \
--cc=david@gibson.dropbear.id.au \
--cc=imammedo@redhat.com \
--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).