From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xo5JF-0002QW-Tb for qemu-devel@nongnu.org; Tue, 11 Nov 2014 01:52:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xo5J5-0003Uh-VZ for qemu-devel@nongnu.org; Tue, 11 Nov 2014 01:52:13 -0500 Received: from e34.co.us.ibm.com ([32.97.110.152]:38195) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xo5J5-0003UN-Kg for qemu-devel@nongnu.org; Tue, 11 Nov 2014 01:52:03 -0500 Received: from /spool/local by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 10 Nov 2014 23:52:02 -0700 Message-ID: <5461B205.1060702@linux.vnet.ibm.com> Date: Tue, 11 Nov 2014 12:21:49 +0530 From: Aravinda Prasad MIME-Version: 1.0 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> In-Reply-To: <20141111061124.GJ15270@voom.redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: David Gibson Cc: Tom Musta , benh@au1.ibm.com, aik@au1.ibm.com, qemu-devel@nongnu.org, qemu-ppc@nongnu.org, paulus@samba.org 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 not >>>> able to exactly recall what was the problem) may be due to not familiar >>>> 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 > > 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. It is ORed with r0 >>From ISA: ori RA,RS,UI (RA) <- (RS) | (0 || UI) The contents of register RS are ORed with 0 || UI and the result is placed into register RA. > -- Regards, Aravinda