Re: [PATCH v2] kvm: x86: Disable KVM_HC_CLOCK_PAIRING if tsc is in always catchup mode

Paolo Bonzini
2022-02-17T17:14:34Z

On 2/17/22 17:09, Vitaly Kuznetsov wrote:
> Sean Christopherson <seanjc@google.com> writes:
>
>> On Wed, Feb 16, 2022, Vitaly Kuznetsov wrote:
>
> ...
>>
>>> Also, EOPNOTSUPP makes it sound like the hypercall is unsupported, I'd
>>> suggest changing this to KVM_EFAULT.
>>
>> Eh, it's consistent with the above check though, where KVM returns KVM_EOPNOTSUPP
>> due to the vclock mode being incompatible. This is more or less the same, it's
>> just a different "mode". KVM_EFAULT suggests that the guest did something wrong
>> and/or that the guest can remedy the problem in someway, e.g. by providing a
>> different address. This issue is purely in the host's domain.
>
> Ack, Paolo's already made the change back to KVM_EOPNOTSUPP upon commit
> (but I still mildly dislike using 'EOPNOTSUPP' for a temporary condition
> on the host).

It's not temporary, always-catchup is set on KVM_SET_TSC_KHZ and never
goes away.

Paolo