From: Ian Campbell Subject: Re: [PATCH] Linux: 6 arguments hypercall v2 Date: Fri, 24 Jun 2011 16:07:35 +0100 Message-ID: <1308928055.32717.137.camel@zakaz.uk.xensource.com> References: <20110624140044.GA22264@spongy.cam.xci-test.com> <1308926818.32717.135.camel@zakaz.uk.xensource.com> <20110624145901.GA356@spongy.cam.xci-test.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20110624145901.GA356@spongy.cam.xci-test.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: Jean Guyader Cc: Jeremy Fitzhardinge , "xen-devel@lists.xensource.com" , Jean Guyader , Konrad Rzeszutek Wilk List-Id: xen-devel@lists.xenproject.org On Fri, 2011-06-24 at 15:59 +0100, Jean Guyader wrote: > 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. Well, with my specific version of gcc (4.4.5-8)... I didn't check the docs to see if it supposed to be ok or not or anything like that. > Also my patch modifies HYPERVISOR_set_trap_table by mistake but > shouldn't. I only used that for testing _hypercall6. I did the same ;-) > I'll send > another version with your changes in but without the mistake > at the end. Ian.