On Wed, Mar 21, 2018 at 04:33:33PM +0100, Paolo Bonzini wrote:
> On 20/03/2018 18:35, Vitaly Kuznetsov wrote:
> > + if (has_msr_hv_frequencies && env->tsc_khz) {
> > env->features[FEAT_HYPERV_EAX] |= HV_ACCESS_FREQUENCY_MSRS;
> > env->features[FEAT_HYPERV_EDX] |= HV_FREQUENCY_MSRS_AVAILABLE;
> > }
>
> Since you have added cpu->hyperv_reenlightenment, I'd rather change this
> so that we don't make the "license to change guest ABI across migration"
> apply more. We can exploit the fact that Windows doesn't even use the
> MSRs unless either invtsc or re-enlightenment is present.
That's not a given. It reportedly doesn't use these MSRs *now*, but I
see no reason for it not to start using it at some point, say, to avoid
TSC calibration. E.g. Linux already does so with its hv_get_tsc_khz().
And the bad thing is that it'll kill your guest with #GP when you
migrate from a new KVM to an old one.
Roman.