From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christian Ehrhardt Date: Wed, 20 Aug 2008 12:41:25 +0000 Subject: Re: [PATCH 2/4] kvmppc: add hypercall infrastructure - guest part Message-Id: <48AC10F5.2010506@linux.vnet.ibm.com> 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="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: Arnd Bergmann Cc: jimix@us.ibm.com, linuxppc-dev@ozlabs.org, hollisb@us.ibm.com, kvm-ppc@vger.kernel.org Arnd Bergmann wrote: > On Tuesday 19 August 2008, ehrhardt@linux.vnet.ibm.com wrote: > =20 >> +static inline long kvm_hypercall1(unsigned int nr, unsigned long p1) >> +{ >> + register unsigned long hcall asm ("r0") =3D nr; >> + register unsigned long arg1 asm ("r3") =3D p1; >> + register long ret asm ("r11"); >> + >> + asm volatile(".long %1" >> + : "=3Dr"(ret) >> + : "i"(KVM_HYPERCALL_BIN), "r"(hcall), "r"(arg1) >> + : "r4", "r5", "r6", "r7", "r8", >> + "r9", "r10", "r12", "cc"); >> + return ret; >> +} >> =20 > > 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. > > Arnd <>< > =20 Some documentation is here=20 http://kvm.qumranet.com/kvmwiki/PowerPC_Hypercall_ABI As far as I remember it was oriented on system calls, from my point we=20 can still change it atm. When we discussed about that I was too new to the power architecture to=20 really get all the details, but I assume Hollis and Jimi can answer you=20 that. --=20 Gr=FCsse / regards,=20 Christian Ehrhardt IBM Linux Technology Center, Open Virtualization