From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56765) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmKRX-0006mm-Kv for qemu-devel@nongnu.org; Thu, 06 Nov 2014 05:37:40 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmKRO-0005kv-IR for qemu-devel@nongnu.org; Thu, 06 Nov 2014 05:37:31 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:34944) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmKRO-0005ki-DG for qemu-devel@nongnu.org; Thu, 06 Nov 2014 05:37:22 -0500 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 6 Nov 2014 05:37:21 -0500 Message-ID: <545B4F23.6080308@linux.vnet.ibm.com> Date: Thu, 06 Nov 2014 16:06:19 +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> <6091BB42-00E9-49CF-A9A7-C44C8EB84DB0@suse.de> In-Reply-To: <6091BB42-00E9-49CF-A9A7-C44C8EB84DB0@suse.de> 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: Alexander Graf Cc: Tom Musta , "benh@au1.ibm.com" , "aik@au1.ibm.com" , "qemu-devel@nongnu.org" , "qemu-ppc@nongnu.org" , "paulus@samba.org" On Thursday 06 November 2014 03:59 PM, Alexander Graf wrote: > > > >> Am 06.11.2014 um 11:00 schrieb Aravinda Prasad : >> >> >> [...] >>> >>> And, perhaps this was discussed in an earlier patch, but couldn't you just do: >>> >>> li 3,KVMPPC_H_REPORT_MC_ERR >>> >>> here and avoid the patching altogether? >> >> KVMPPC_H_REPORT_MC_ERR def in not visible in spapr-rtas.S, either I can >> define it in spapr-rtas.S as already done for KVMPPC_H_RTAS or patch it >> in ibm,nmi-register call. > > Could you include the header? hmm. ok. > >> >> It is very unlikely that the KVMPPC_H_REPORT_MC_ERR will be changed, but >> I prefer to patch it to avoid maintaining it in both places. What do you >> think? > > Hypercall numbers need to be stable anyway in case we migrate from an older qemu version, so it must not change. ok > > > Alex > >> >>> >>> >>> >>>>> + sc 1 /* Issue H_CALL */ >>>>> + cmpdi cr0,3,0 >>>>> + beq cr0,1b /* retry KVMPPC_H_REPORT_MC_ERR */ >>>>> + mtsprg 2,4 >>>>> + ld 4,0(3) >>>>> + mtsrr0 4 /* Restore srr0 */ >>>>> + ld 4,8(3) >>>>> + mtsrr1 4 /* Restore srr1 */ >>>>> + ld 4,16(3) >>>>> + mtcrf 0,4 /* Restore cr */ >>>>> + addi 3,3,24 >>>>> + mfsprg 4,2 >>>>> + /* >>>>> + * Branch to address registered by OS. The branch address is >>>>> + * patched in the ibm,nmi-register rtas call. >>>>> + */ >>>>> + ba 0x0 >>>>> + b . >> >> -- >> Regards, >> Aravinda >> > -- Regards, Aravinda