[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1207271454470.26163@kaball.uk.xensource.com>
Date: Fri, 27 Jul 2012 14:57:52 +0100
From: Stefano Stabellini <stefano.stabellini@...citrix.com>
To: Christopher Covington <cov@...eaurora.org>
CC: Ian Campbell <Ian.Campbell@...rix.com>,
Stefano Stabellini <Stefano.Stabellini@...citrix.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"xen-devel@...ts.xensource.com" <xen-devel@...ts.xensource.com>,
"linaro-dev@...ts.linaro.org" <linaro-dev@...ts.linaro.org>,
"arnd@...db.de" <arnd@...db.de>,
"konrad.wilk@...cle.com" <konrad.wilk@...cle.com>,
"catalin.marinas@....com" <catalin.marinas@....com>,
"Tim (Xen.org)" <tim@....org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH 02/24] xen/arm: hypercalls
On Fri, 27 Jul 2012, Christopher Covington wrote:
> On 07/27/2012 05:19 AM, Ian Campbell wrote:
> > On Thu, 2012-07-26 at 20:19 +0100, Christopher Covington wrote:
> >> Hi Stefano,
> >>
> >> On 07/26/2012 11:33 AM, Stefano Stabellini wrote:
> >>> Use r12 to pass the hypercall number to the hypervisor.
> >>>
> >>> We need a register to pass the hypercall number because we might not
> >>> know it at compile time and HVC only takes an immediate argument.
> >>
> >> You're not going to JIT assemble the appropriate HVC instruction? Darn.
> >
> > ;-)
> >
I admit having spent few hours thinking about how to implement a
self-modifying function able to change the ISS at run time. Fortunately
few hours later I was struck by common sense and I decided to follow a
different direction ;-)
> > The maximum currently defined hypercall number is 55, although there are
> > some small gaps so there's actually more like 45 in total.
> >
> >> It seems like it'd be
> >> reasonable to take the approach that seems to be favored for MRC/MCR
> >> instructions, using a function containing switch statement that chooses
> >> between several inline assembly instructions based off an enum passed to
> >> the function. See for example arch_timer_reg_read in
> >> arch/arm/kernel/arch_timer.c.
> >
> > I don't think it is feasible with this number of hypercalls, even
> > accepting that in many cases the number will be a constant so gcc can
> > likely optimise almost all of it away.
> >
> > Is there something wrong with the r12 based approach?
>
> Only that you're defining a custom interface for something that there is
> a potentially more standard interface for. I just wanted to double check
> that all the ways of using the potentially more standard interface had
> been explored and found to be unreasonable.
Yep, thanks for helping us reviewing the code.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists