On 18/03/21 17:38, Vitaly Kuznetsov wrote:
Could we instead fail to load the reenlightenment section if
user_tsc_khz was not set? This seems to be user (well, management)
error really, since reenlightenment has to be enabled manually (or with
hv-passthrough which blocks migration too).
Yes, we certainly could do that but what's the added value of
user_tsc_khz which upper layer will have to set explicitly (probably to
the tsc frequency of the source host anyway)? In case we just want to
avoid calling KVM_SET_TSC_KHZ twice, we can probably achieve that by
adding a CPU flag or something.
What I want to achieve is to forbid migration of VMs with
reenlightenment, if they don't also specify tsc-khz to the frequency of
the TSC on the source host. We can't check it at the beginning of
migration, but at least we can check it at the end.
Maybe we're talking about two different things?
Paolo