Thread (99 messages) 99 messages, 9 authors, 2012-08-06

[PATCH 02/24] xen/arm: hypercalls

From: Ian Campbell <hidden>
Date: 2012-07-27 09:19:59
Also in: lkml, xen-devel

On Thu, 2012-07-26 at 20:19 +0100, Christopher Covington wrote:
Hi Stefano,

On 07/26/2012 11:33 AM, Stefano Stabellini wrote:
quoted
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.
;-)
How many call numbers are there, though? 8?
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?

Ian.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help