From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XoAE2-0005eF-Ky for qemu-devel@nongnu.org; Tue, 11 Nov 2014 07:07:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XoADw-0001jP-Sx for qemu-devel@nongnu.org; Tue, 11 Nov 2014 07:07:10 -0500 Date: Tue, 11 Nov 2014 22:30:28 +1100 From: David Gibson Message-ID: <20141111113028.GA12750@voom.fritz.box> References: <20141105071019.26196.93729.stgit@aravindap> <20141105071315.26196.68104.stgit@aravindap> <5459E0B4.3040402@suse.de> <545A464F.7080906@gmail.com> <545B46A1.6060009@linux.vnet.ibm.com> <20141111031923.GG15270@voom.redhat.com> <5461A315.3040602@linux.vnet.ibm.com> <20141111061124.GJ15270@voom.redhat.com> <5461B205.1060702@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T4sUOijqQbZv57TR" Content-Disposition: inline In-Reply-To: <5461B205.1060702@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 4/4] target-ppc: Handle ibm, nmi-register RTAS call List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aravinda Prasad Cc: Tom Musta , benh@au1.ibm.com, aik@au1.ibm.com, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, paulus@samba.org --T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 11, 2014 at 12:21:49PM +0530, Aravinda Prasad wrote: >=20 >=20 > On Tuesday 11 November 2014 11:41 AM, David Gibson wrote: > > On Tue, Nov 11, 2014 at 11:18:05AM +0530, Aravinda Prasad wrote: > >> > >> > >> On Tuesday 11 November 2014 08:49 AM, David Gibson wrote: > >>> On Thu, Nov 06, 2014 at 03:30:01PM +0530, Aravinda Prasad wrote: > >>>> On Wednesday 05 November 2014 09:16 PM, Tom Musta wrote: > >>>>> On 11/5/2014 2:32 AM, Alexander Graf wrote: > >>>>>> On 05.11.14 08:13, Aravinda Prasad wrote: > >>> > >>> [snip] > >>>>>>> + /* > >>>>>>> + * ori r3,r3,KVMPPC_H_REPORT_MC_ERR. The KVMPPC_H_REPORT_MC_ERR > >>>>>>> + * value is patched below > >>>>>>> + */ > >>>>>>> +1: ori 3,3,0 > >>>>> > >>>>> Why do "li 3,0" followed by "ori 3,3,X"? Isn't this just "li 3,X" = ? (aka "addi 3,0,X") > >>>> > >>>> I remember I first tried doing li r3,X but faced some problem (but n= ot > >>>> able to exactly recall what was the problem) may be due to not famil= iar > >>>> with ppc assembly. > >>> > >>> This would be because with the offset to the private hcalls, the > >>> actual hcall number is 0xf003, which means an li instruction will sign > >>> extend it incorrectly. So you will need two instructions to load the > >>> number. > >> > >> hmm.. ok > >=20 > > At least, I think you'll need to instructions. I don't remember for > > certain if 'ori 3,0,X' will OR X with literal 0 or the contents of r0. >=20 > It is ORed with r0 >=20 > >From ISA: >=20 > ori RA,RS,UI >=20 > (RA) <- (RS) | (0 || UI) >=20 > The contents of register RS are ORed with 0 || UI and > the result is placed into register RA. Right, thought so. So unless there's some instruction I haven't thought of, you'll need two instructions to load the value. --=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 --T4sUOijqQbZv57TR Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJUYfNTAAoJEGw4ysog2bOStzkP/3K1bankFnun9/bZ1zs7izpz 6nEbqhnxEk8Q1Jf4IGwjfot/58OmJ5QogOa2/x/x76AXkBOcjL33I1OIOCkzg0o6 tD57wdhA51IAuLFwINEdlTSGVJAdAyIvg90NSbAGIQJAQO1JIyodCmMu4mMsvJwa K8eh8O8XzI4Tf4TXU6aqeunlv+yG5X7I/VJ5hzw+dOBRiquBmG5QoCi9fq2i+9AQ LTRFfV3++a3+3CWECaCda031227jXDiOZeJwQdXzSsEC9FidT78hpP9HpnxzZnGR jv9kiKfHuG1BHXZ3Nt7TIJkbCyOYsH24SEDH/9EpsAMhmKK2j/qWUjlz5TiEaDpe ONwyHLXXi9z9kDYlKAGPfHiWjdudh7joKD4C7wrIJp9kJBPlcn9iEazpVqq1NSv4 ZdWt3WYBBVTTcaIP1juWNE4DejeYyWXPANHlwHRVBYc6rU43eYYe12T06vA/vYnP 4vKwPjNjmR3O7sAfafYUHL1fsKg+F2DdLeMkZ/JeSEgh/HsKydGW+E31pRDcbSB7 ZtYnsi1GizrSrZr2ewevnhBik4Zh3uB6OlNtlg++OMkkECQrIaEBnLuALADE0CTU EFac7PDGUtFwhAgHz0wCagRUxVniCv26IcHTbCZTL8Nrpr/BXcxAD/iJ76qpH1fg zZlQtgN3XsxhllyWfEs3 =W7/k -----END PGP SIGNATURE----- --T4sUOijqQbZv57TR--