Re: [RFC PATCH 0/3] generic hypercall support

Avi Kivity
2009-05-05T14:00:38Z

Gregory Haskins wrote:
> Avi Kivity wrote:
>
>> Gregory Haskins wrote:
>>
>>> (Applies to Linus' tree, b4348f32dae3cb6eb4bc21c7ed8f76c0b11e9d6a)
>>>
>>> Please see patch 1/3 for a description. This has been tested with a KVM
>>> guest on x86_64 and appears to work properly. Comments, please.
>>>
>>>
>> What about the hypercalls in include/asm/kvm_para.h?
>>
>> In general, hypercalls cannot be generic since each hypervisor
>> implements its own ABI.
>>
> Please see the prologue to 1/3. Its all described there, including a
> use case which I think answers your questions. If there is still
> ambiguity, let me know.
>
>

Yeah, sorry.

>> The abstraction needs to be at a higher level (pv_ops is such a level).
>>
> Yep, agreed. Thats exactly what this series is doing, actually.
>

No, it doesn't. It makes "making hypercalls" a pv_op, but hypervisors
don't implement the same ABI.

pv_ops all _use_ hypercalls to implement higher level operations, like
set_pte (probably the only place set_pte can be considered a high level
operation).

In this case, the higher level event could be
hypervisor_dynamic_event(number); each pv_ops implementation would use
its own hypercalls to implement that.

--
error compiling committee.c: too many arguments to function