From: Jean Guyader Subject: Re: [PATCH] Linux: 6 arguments hypercall v2 Date: Fri, 24 Jun 2011 15:59:01 +0100 Message-ID: <20110624145901.GA356@spongy.cam.xci-test.com> References: <20110624140044.GA22264@spongy.cam.xci-test.com> <1308926818.32717.135.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: Content-Disposition: inline In-Reply-To: <1308926818.32717.135.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: Jeremy Fitzhardinge , "xen-devel@lists.xensource.com" , Jean Guyader , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On 24/06 03:46, Ian Campbell wrote: > On Fri, 2011-06-24 at 15:00 +0100, Jean Guyader wrote: > > Hi, > > > > This patch implements the 6 arguments hypercalls. > > The sixth argument is passed using ebp or r9. > > Looks pretty good. > > I was able to get rid of more of the ifdefery etc with the following. It > appears to do the right thing (by inspection of compiled code, not > actual testing). > > Defining both __res and __arg6 as register("eax") seems slightly > dubious, as is including them both in __HYPERCALL_6PARAM, but gcc > doesn't seem to mind and it makes __HYPERCALL_6PARAM the same in both > cases and gets rid of __HYPERCALL_DECLS6. > > Your version is probably less likely to tickle ggc bugs/behaviour > changes in the future, so it's likely safer I think. > Thanks that makes the code much nicer, I didn't really want to declare to variable in eax but if that works fine. Also my patch modifies HYPERVISOR_set_trap_table by mistake but shouldn't. I only used that for testing _hypercall6. I'll send another version with your changes in but without the mistake at the end. Jean