From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bLj8B-0007l7-0o for qemu-devel@nongnu.org; Fri, 08 Jul 2016 23:40:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bLj89-0001fr-6o for qemu-devel@nongnu.org; Fri, 08 Jul 2016 23:40:37 -0400 Message-ID: <1468035603.20552.28.camel@kernel.crashing.org> From: Benjamin Herrenschmidt Date: Sat, 09 Jul 2016 13:40:03 +1000 In-Reply-To: <1468034545.20552.26.camel@kernel.crashing.org> References: <1467355319-28406-1-git-send-email-david@gibson.dropbear.id.au> <1467355319-28406-6-git-send-email-david@gibson.dropbear.id.au> <1468032411.20552.21.camel@kernel.crashing.org> <1468032757.20552.22.camel@au1.ibm.com> <1468033216.20552.23.camel@kernel.crashing.org> <1468033695.20552.24.camel@kernel.crashing.org> <1468034545.20552.26.camel@kernel.crashing.org> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [PATCH] ppc: Fix support for odd MSR combinations List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Mark Cave-Ayland , David Gibson , peter.maydell@linaro.org Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org, =?ISO-8859-1?Q?C=E9dric?= Le Goater On Sat, 2016-07-09 at 13:22 +1000, Benjamin Herrenschmidt wrote: > MacOS uses an architecturally illegal MSR combination that > seems nonetheless supported by 32-bit processors, which is > to have MSR[PR]=3D1 and one or more of MSR[DR/IR/EE]=3D0. >=20 > This adds support for it. To work properly we need to also > properly include support for PR=3D1,{I,D}R=3D0 to the MMU index > used by the qemu TLB. >=20 > Signed-off-by: Benjamin Herrenschmidt > --- Oopps, little bug, v2 on its way: +=C2=A0 =C2=A0=C2=A0=C2=A0if ((env->flags & PPC_64B) && ((value >> MSR_PR) & 1)) = { This should be insns_flags > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0value |=3D (1 << = MSR_EE) | (1 << MSR_DR) | (1 << MSR_IR); > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0} > =C2=A0#endif