From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: "Alexander Graf" <agraf@suse.de>,
"Andreas Färber" <afaerber@suse.de>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] ppc: CPU reset must flush translation buffer
Date: Mon, 21 May 2012 17:39:26 +1000 [thread overview]
Message-ID: <1337585966.2779.8.camel@pasglop> (raw)
In-Reply-To: <CAFEAcA9aiOE6HzK7MtRn-0_6vx0Tfa4zCg=Uyei-UE6i0+=hQQ@mail.gmail.com>
On Mon, 2012-05-21 at 08:15 +0100, Peter Maydell wrote:
> The conclusion we came to is that you only need to tb_flush
> in your CPU's reset function if you have some CPU state which
> you handle by baking it into translated code and doing a tb_flush
> when the state changes. This is relatively rare, most CPU
> frontends only use the other options:
> (a) CPU state is constant for life of simulation
> (b) CPU state not baked into code
> (c) CPU state encoded in tb_flags.
>
> In particular, target-ppc doesn't have any uses of tb_flush
> at the moment, so either this fix is insufficient (and you need
> to also use tb_flush at the point where the relevant state is
> changed by whatever helper function) or it's the wrong fix.
>
> If the issue is ROM reloading then the loading code needs to
> be fixed (compare the way that the memory region API correctly
> handles bits of physical memory being mapped/unmapped/remapped
> without the caller needing to do a tb_reset).
Hrm, the state shouldn't change in a drastic way.... we can reproduce
from SLOF which is in real mode and the reset happens in real mode... it
looks like a flush of the exception vectors problem to me.
So that would mean that the ROM reload isn't flushing properly (well,
possibly, need to investigate more). From what I can tell the reload is
done implicitely by generic qemu code creating rom objects when I call
load_image_targphys.
So if something is missing here it's from the generic code, I will dig a
bit more later, gotta take care of sick kids...
Cheers,
Ben.
next prev parent reply other threads:[~2012-05-21 7:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1337054780.6727.60.camel@pasglop>
2012-05-21 2:01 ` [Qemu-devel] ppc: CPU reset must flush translation buffer Benjamin Herrenschmidt
2012-05-21 6:16 ` Alexander Graf
2012-05-21 6:26 ` Benjamin Herrenschmidt
2012-05-21 7:15 ` Peter Maydell
2012-05-21 7:39 ` Benjamin Herrenschmidt [this message]
2012-05-21 7:39 ` [PATCH v2 1/2] ppc64: Rudimentary Support for extra page sizes on server CPUs Alexander Graf
2012-05-21 7:39 ` [Qemu-devel] " Alexander Graf
2012-05-21 7:39 ` 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=1337585966.2779.8.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=afaerber@suse.de \
--cc=agraf@suse.de \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.