From: Hollis Blanchard Date: Thu, 21 Aug 2008 22:25:40 +0000 Subject: Re: [PATCH 2/4] kvmppc: add hypercall infrastructure - guest part Message-Id: <1219357540.20238.74.camel@localhost.localdomain> List-Id: References: <1219142204-12044-1-git-send-email-ehrhardt@linux.vnet.ibm.com> <1219142204-12044-3-git-send-email-ehrhardt@linux.vnet.ibm.com> <200808191328.16934.arnd@arndb.de> In-Reply-To: <200808191328.16934.arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Arnd Bergmann Cc: linuxppc-dev@ozlabs.org, kvm-ppc@vger.kernel.org On Tue, 2008-08-19 at 13:28 +0200, Arnd Bergmann wrote: > On Tuesday 19 August 2008, ehrhardt@linux.vnet.ibm.com wrote: > > +static inline long kvm_hypercall1(unsigned int nr, unsigned long p1) > > +{ > > + register unsigned long hcall asm ("r0") = nr; > > + register unsigned long arg1 asm ("r3") = p1; > > + register long ret asm ("r11"); > > + > > + asm volatile(".long %1" > > + : "=r"(ret) > > + : "i"(KVM_HYPERCALL_BIN), "r"(hcall), "r"(arg1) > > + : "r4", "r5", "r6", "r7", "r8", > > + "r9", "r10", "r12", "cc"); > > + return ret; > > +} > > What is the reasoning for making the calling convention different from > all the existing hcall interfaces here? > > pseries uses r3 for the hcall number, lv1 and beat use r11, so using > r0 just for the sake of being different seems counterintuitive. There was a really good reason at the time, but I can't seem to remember it now. ;) We're thinking about it. -- Hollis Blanchard IBM Linux Technology Center