Received: from eggs.gnu.org ([2001:4830:134:3::10]:54070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c7guv-0007Vx-4z for qemu-devel@nongnu.org; Fri, 18 Nov 2016 06:01:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c7guq-0006tC-KR for qemu-devel@nongnu.org; Fri, 18 Nov 2016 06:01:13 -0500 Received: from ozlabs.org ([103.22.144.67]:42445) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c7guq-0006rd-89 for qemu-devel@nongnu.org; Fri, 18 Nov 2016 06:01:08 -0500 Date: Fri, 18 Nov 2016 17:09:35 +1100 From: David Gibson Message-ID: <20161118060935.GF31640@umbus.fritz.box> References: <20161117134948.26790-1-ze.vlad@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="eNMatiwYGLtwo1cJ" Content-Disposition: inline In-Reply-To: <20161117134948.26790-1-ze.vlad@gmail.com> Subject: Re: [Qemu-devel] [PATCH] ppc: BOOK3E: nothing should be done when MSR:PR is set List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladimir Svoboda Cc: qemu-devel@nongnu.org --eNMatiwYGLtwo1cJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Nov 17, 2016 at 02:49:48PM +0100, Vladimir Svoboda wrote: > The server architecture (BOOK3S) specifies that any instruction that > sets MSR:PR will also set MSR:EE, IR and DR. > However there is no such behavior specification for the embedded > architecture (BOOK3E). >=20 > Signed-off-by: Vladimir Svoboda Applied to ppc-for-2.8, thanks. > --- > target-ppc/helper_regs.h | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) >=20 > diff --git a/target-ppc/helper_regs.h b/target-ppc/helper_regs.h > index bb9ce60..6213816 100644 > --- a/target-ppc/helper_regs.h > +++ b/target-ppc/helper_regs.h > @@ -131,11 +131,14 @@ static inline int hreg_store_msr(CPUPPCState *env, = target_ulong value, > } > /* If PR=3D1 then EE, IR and DR must be 1 > * > - * Note: We only enforce this on 64-bit processors. It appears that > - * 32-bit implementations supports PR=3D1 and EE/DR/IR=3D0 and MacOS > - * exploits it. > + * Note: We only enforce this on 64-bit server processors. > + * It appears that: > + * - 32-bit implementations supports PR=3D1 and EE/DR/IR=3D0 and Mac= OS > + * exploits it. > + * - 64-bit embedded implementations do not need any operation to be > + * performed when PR is set. > */ > - if ((env->insns_flags & PPC_64B) && ((value >> MSR_PR) & 1)) { > + if ((env->insns_flags & PPC_SEGMENT_64B) && ((value >> MSR_PR) & 1))= { > value |=3D (1 << MSR_EE) | (1 << MSR_DR) | (1 << MSR_IR); > } > #endif --=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 --eNMatiwYGLtwo1cJ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYLpsfAAoJEGw4ysog2bOSpVwP/i1MbAtaDLgkgghgxlvOAwrV 7KiAJVzSP7nF1TohH/24Ocr4NaCVpiD2yDLJizmoNtOhqAlyDDSvYLiPw/ESekb7 1i+XmRRlxP2+DIn9xFSgfA51xH/WgUM44BJ2od0Jt+zQJFOEwAFBIbgS7ZvfvBHm f1POFAlqvPBSBHo77czccdbMSNCA7jtRz6pmidrIHyZNEj4KbpF5004t1rE8DPwL 9N+AYGqsnnyPL5xG6IAPUpnPKMnQolhAya1UwiwU/hoxsTy6CtF3g45TXuL9Mcwj eheH97HBoVO/SjCxanfKJHOOwANDIsegHCHh5EFkNrdAfTQBznPUNbV75obMiDsf ArSv4YZf7nU3vzaAOXGMprx1vj37rIYdkGOoidoBUAkPH/w9kFwk/Bj8w4JBgGQl jC837/mL4HADRVTdr64XyJCT1W4S+VmZ8py4QGt5eLgAqIMAxSl3+A3+Jn5KBZPc G6ch/9g4m/fRoDNSFjaQNHra4jsZkjY56T8CUOCdsxvk6QK7CLorNvepRaIbhw4j iC+9Mh5BLjEAOgTEOU0tov4vHBo5CN2alVwQO2C1JN0oki9ph8Kw3+Pa9MM9RLeJ GOWHKMWc4ioBxRoGE2XVVzccv9DAfdaGKsS1CXBCaORmQQLahaY/32riFsTiVHGl KQuAcWbpO98plnIpZHCO =SPJq -----END PGP SIGNATURE----- --eNMatiwYGLtwo1cJ--