From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48431) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHQMj-0001Ul-Cl for qemu-devel@nongnu.org; Mon, 27 Jun 2016 02:49:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHQMi-0003uu-9w for qemu-devel@nongnu.org; Mon, 27 Jun 2016 02:49:53 -0400 Date: Mon, 27 Jun 2016 16:48:45 +1000 From: David Gibson Message-ID: <20160627064845.GQ4242@voom.fritz.box> References: <1466660926-1544-1-git-send-email-david@gibson.dropbear.id.au> <1466660926-1544-8-git-send-email-david@gibson.dropbear.id.au> <1467002528.20278.37.camel@kernel.crashing.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="wr1Q/2bz0MCWWNYv" Content-Disposition: inline In-Reply-To: <1467002528.20278.37.camel@kernel.crashing.org> Subject: Re: [Qemu-devel] [PULL 07/17] ppc: Fix rfi/rfid/hrfi/... emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Benjamin Herrenschmidt Cc: peter.maydell@linaro.org, agraf@suse.de, qemu-ppc@nongnu.org, pbonzini@redhat.com, qemu-devel@nongnu.org, =?iso-8859-1?Q?C=E9dric?= Le Goater , Mark Cave-Ayland --wr1Q/2bz0MCWWNYv Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 > >=20 > > 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. >=20 > See I'd rather we didn't boot at all. >=20 > 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... >=20 > Until I figured we were losing the 64-bit mode in the MSR. Why ? >=20 > 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. >=20 > 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. >=20 > 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. >=20 > Typically that was happening on the call to=A0__cpu_preinit_ppc970 which > happens to reside far enough away that it needs a new translation. >=20 > 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. --=20 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 --wr1Q/2bz0MCWWNYv Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXcMxNAAoJEGw4ysog2bOSwTcP/2EVhdtZJRiGhW8L6JGQvY3E yNk4bJGCKk1uOlIcfPq1yIA2MwrrVj7z++5cHnbJNbY/IFe4WY0cRoQHiBHd7vPk Op62/8psUtoO9eHz1yHYQxfV9NrMAD6AyYjAknUDg0SqEqkZkFliOtI1m/AsSMf7 p5DsL/VI46jJIZC5EmHnC/xdnXc7C7O4gPAalBQkRgbGEC4OUFMkanLtxrJLwUMB 5mNdzJL5nn5wAdE4FOQHJR/PCZl/GLZbRMnuekb207xrnhy3/ZmnWhqv0WqeL+lU UTcRULkI7zh17bW1hqY43QxNdJB74/osOj9sAKVNXcl/vHjQco1FS/ckj8H2eqWT xv+9kQFt2Tzauxg0o1VlN0DEc9jfn5xBZHjg7KmszKGFiWxAkfH2LFId+k7dSsX3 FW0XS7ZoU6dy9rctZddlk4xMN2EUft0TP8/lUezhhxK5RhkUT5a2/NB4hKLvdz1U lB5fNxs7eq+8jD0g0llDT27tbdgxYyuqB6ND4Bc9lnLJeXIIIt/WbbG3+orfW/TW QLkzgz1KDmQ9HfJ7W8S2xOcf5ZAgPYEWsNm76SsvFgMebMbmzMSCIkL8UGSX+XP3 KtgunCU5Sy7f77tWohX0zyQ4M7dFUc+IFA7p+RVikBrzClGExBj8dP2H6MBhyQXE HH9fuLY96TWToMykTzSS =NtO4 -----END PGP SIGNATURE----- --wr1Q/2bz0MCWWNYv--