qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: peter.maydell@linaro.org, agraf@suse.de, qemu-ppc@nongnu.org,
	pbonzini@redhat.com, qemu-devel@nongnu.org,
	"Cédric Le Goater" <clg@kaod.org>,
	"Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>
Subject: Re: [Qemu-devel] [PULL 07/17] ppc: Fix rfi/rfid/hrfi/... emulation
Date: Mon, 27 Jun 2016 16:48:45 +1000	[thread overview]
Message-ID: <20160627064845.GQ4242@voom.fritz.box> (raw)
In-Reply-To: <1467002528.20278.37.camel@kernel.crashing.org>

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

On Mon, Jun 27, 2016 at 02:42:08PM +1000, Benjamin Herrenschmidt wrote:
> On Thu, 2016-06-23 at 15:48 +1000, David Gibson wrote:
> > From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > 
> > This reworks emulation of the various "rfi" variants. I removed
> > some masking bits that I couldn't make sense of, the only bit that
> > I am aware we should mask here is POW, the CPU's MSR mask should
> > take care of the rest.
> 
> See I'd rather we didn't boot at all.
> 
> I just spent hours trying to figure out why my kernel wouldn't boot
> in qemu on a mac99 model with 970, weird weird things happening
> inside the device-tree parsing...
> 
> Until I figured we were losing the 64-bit mode in the MSR. Why ?
> 
> Because OpenBIOS isn't bolting the hash entries or SLBs for the entire
> kernel ! So we are taking some exceptions right during the early
> assembly, precisely between enable_64b_mode and __mmu_off.
> 
> Now this is really fishy to begin with, there is code in there that
> will use SRR0/SRR1 and won't expect a fault of any sort... such
> as __mmu_off itself.
> 
> The problem in our case was that OpenBIOS using rfi, it only restores
> 32-bits of the MSR, so we lose the 64-bit flag.
> 
> Typically that was happening on the call to __cpu_preinit_ppc970 which
> happens to reside far enough away that it needs a new translation.
> 
> I wonder if prom_init should "touch" the entire kernel for safety,
> but in any case, OpenBIOS need that fix urgently.

Ah, ok, I hadn't realized that OpenBIOS still failed to boot, just
later in the process with this hunk left out.

-- 
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: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2016-06-27  6:49 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-23  5:48 [Qemu-devel] [PULL 00/17] ppc-for-2.7 queue 20160623 David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 01/17] powerpc/mm: Update the WIMG check during H_ENTER David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 02/17] tests: Use '+=' to add additional tests, not '=' David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 03/17] ppc64: disable gen_pause() for linux-user mode David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 04/17] target-ppc: Fix rlwimi, rlwinm, rlwnm again David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 05/17] ppc: Improve emulation of THRM registers David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 06/17] memory: Add reporting of supported page sizes David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 07/17] ppc: Fix rfi/rfid/hrfi/... emulation David Gibson
2016-06-27  4:42   ` Benjamin Herrenschmidt
2016-06-27  6:43     ` Mark Cave-Ayland
2016-06-27  6:48     ` David Gibson [this message]
2016-06-27  6:52       ` Benjamin Herrenschmidt
2016-06-23  5:48 ` [Qemu-devel] [PULL 08/17] ppc: define a default LPCR value David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 09/17] ppc: fix exception model for HV mode David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 10/17] ppc: Fix POWER7 and POWER8 exception definitions David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 11/17] ppc: Fix generation if ISI/DSI vs. HV mode David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 12/17] ppc: Rework generation of priv and inval interrupts David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 13/17] ppc: Add real mode CI load/store instructions for P7 and P8 David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 14/17] ppc: Turn a bunch of booleans from int to bool David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 15/17] ppc: Move exception generation code out of line David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 16/17] ppc: Add P7/P8 Power Management instructions David Gibson
2016-06-23  5:48 ` [Qemu-devel] [PULL 17/17] ppc: Disable huge page support if it is not available for main RAM David Gibson
2016-06-23 11:43 ` [Qemu-devel] [PULL 00/17] ppc-for-2.7 queue 20160623 Peter Maydell

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=20160627064845.GQ4242@voom.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=agraf@suse.de \
    --cc=benh@kernel.crashing.org \
    --cc=clg@kaod.org \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --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).