From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50390) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bDrY4-0000za-39 for qemu-devel@nongnu.org; Fri, 17 Jun 2016 07:02:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bDrXy-0001bF-PB for qemu-devel@nongnu.org; Fri, 17 Jun 2016 07:02:51 -0400 References: <1465795496-15071-1-git-send-email-clg@kaod.org> <1465795496-15071-2-git-send-email-clg@kaod.org> <20160616010702.GI28087@voom.fritz.box> <20160617022731.GA19581@voom.fritz.box> <57639095.5010305@kaod.org> <576392B1.6030204@kaod.org> <5763A258.2010408@redhat.com> <5763D3EF.6060305@kaod.org> From: Thomas Huth Message-ID: <5763D8D1.70701@redhat.com> Date: Fri, 17 Jun 2016 13:02:41 +0200 MIME-Version: 1.0 In-Reply-To: <5763D3EF.6060305@kaod.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH 01/10] ppc: Fix rfi/rfid/hrfi/... emulation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: =?UTF-8?Q?C=c3=a9dric_Le_Goater?= , David Gibson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, Mark Cave-Ayland On 17.06.2016 12:41, C=C3=A9dric Le Goater wrote: > On 06/17/2016 09:10 AM, Thomas Huth wrote: >> On 17.06.2016 08:03, C=C3=A9dric Le Goater wrote: >>> On 06/17/2016 07:54 AM, C=C3=A9dric Le Goater wrote: >>>> On 06/17/2016 04:27 AM, David Gibson wrote: >>>>> On Thu, Jun 16, 2016 at 11:07:02AM +1000, David Gibson wrote: >>>>>> On Mon, Jun 13, 2016 at 07:24:47AM +0200, C=C3=A9dric Le Goater wr= ote: >>>>>>> From: Benjamin Herrenschmidt >>>>>>> >>>>>>> This reworks emulation of the various "rfi" variants. I removed >>>>>>> some masking bits that I couldn't make sense of, the only bit tha= t >>>>>>> I am aware we should mask here is POW, the CPU's MSR mask should >>>>>>> take care of the rest. >>>>>>> >>>>>>> This also fixes some problems when running 32-bit userspace under >>>>>>> a 64-bit kernel. >=20 > he. >=20 >>>>>>> Signed-off-by: Benjamin Herrenschmidt >>>>>>> Reviewed-by: David Gibson >>>>>> >>>>>> I've merged this patch to ppc-for-2.7. >>>>> >>>>> ..and now I've removed it again. It seems that this breaks Thomas' >>>>> new test that OpenBIOS runs on the mac machine types. Not sure why= , >>>>> but we need to figure that out before I apply. >>>> >>>> Just this patch ? I booted a macosx image with it. but maybe just a = mac99. >>>> I will check today. >>> >>> With your branch ppc-for-2.7 (at commit aba2e6258d86) + the=20 >>> "ppc: Fix rfi/rfid/hrfi/... emulation" patch, these guests :=20 >>> >>> qemu-system-ppc -cdrom ./darwinppc-602.cdr -boot d=20 >>> qemu-system-ppc -M mac99 -cdrom ./darwinppc-602.cdr -boot d=20 >> ^ >> | >> You're missing the "64" here ;-) >> >>> reach the installer macosx installer. >> >> It seems to be only failing for the 64-bit builds - and there only for >> the PPC970 CPU (which is the default for the mac99 machine in 64-bit >> builds): >> >> qemu-system-ppc64 -nographic -cpu 750 -M mac99 =3D=3D> works fine >> >> qemu-system-ppc64 -nographic -cpu 970 -M mac99 =3D=3D> hangs >=20 >=20 > This is too brutal : >=20 > + /* This instruction doesn't exist anymore on 64-bit server > + * processors compliant with arch 2.x > + */ > + if (ctx->insns_flags & PPC_SEGMENT_64B) { > + gen_inval_exception(ctx, POWERPC_EXCP_INVAL_INVAL); > + return; > + } >=20 > There are a couple of instructions which have been deleted from=20 > ISA 2.x. rfi is one of them. Could we use a insn_flag to filter > them ?=20 According to the PPC970FX user manual that I have: "The 970FX does not provide support for the following optional or obsolete instructions (or instruction forms). Attempted use of these will result in an illegal instruction type program interrupt. [...] =C2=B7 rfi - Return from interrupt (obsolete) " So if OpenBIOS is using this instruction in 970 mode, it's maybe OpenBIOS that should be fixed instead? Thomas