On 14/01/2016 09:30, Pavel Fedin wrote:
>  Hello!
> 
>> --- a/Documentation/virtual/kvm/api.txt
>> +++ b/Documentation/virtual/kvm/api.txt
>> @@ -3359,6 +3359,14 @@ Hyper-V SynIC state change. Notification is used to 
>> remap SynIC
>>  event/message pages and to enable/disable SynIC messages/events processing
>>  in userspace.
>>
>> +            /* KVM_EXIT_HYPERV_HCALL */
>> +            struct {
>> +                    __u64 input;
>> +                    __u64 params[2];
>> +                    __u64 result;
>> +            } hv_hcall;
>> +Indicates that the VCPU exits into userspace to process some guest
>> +Hyper-V hypercalls.
> 
> Why introducing this? We already have KVM_EXIT_HYPERCALL, which is
> exactly the same. AFAIK it's not used at the moment.
> Additionally, in theory we could have hypercalls handled in
> userspace for something else except HyperV. And not only for x86.

Because, as the docs say, we don't want to do that.  We want to use
KVM_EXIT_IO or KVM_EXIT_MMIO, with two exceptions: s390 and wherever we
can't do that for compatibility purposes.  This is the latter.  So we
should not add a new exit (I suggested elsewhere the existing hyper-v
exit) but we shouldn't use KVM_EXIT_HYPERCALL either.

There is a precedent in fact of using "something else than
KVM_EXIT_HYPERCALL" for interoperability/compatibility hypercalls,
namely KVM_EXIT_PAPR_HCALL.

Paolo

Reply via email to