Re: [patch] KVM: add MSR based hypercall API

Ingo Molnar
2007-01-09T14:44:34Z

* Ingo Molnar <mingo-X9Un+BFzKDI@public.gmane.org> wrote:

> +/*
> + * Hypercall calling convention:
> + *
> + * RAX is the hypercall index, goes from 0 to __NR_hypercalls-1
> + *
> + * Each hypercall may have 0-6 parameters.
> + *
> + * parameters 1-6 are in the standard gcc x86_64 calling convention
> + * order: RDI, RSI, RDX, RCX, R8, R9.
> + *
> + * 32-bit parameters are: EDI, ESI, EDX, ECX, EBX, EBP
> + */

about the 32-bit side: maybe it gives us a bit more options for later if
we pick the natural order for 32-bit too: EBX for index, EAX, EDX, ECX
for the first 3 parameters, with the remaining 3 parameters in ESI, EDI,
EBP? Most hypercalls will have 0, 1, 2 or 3 parameters.