KVM: x86: hyper-v: Limit guest to writing zero to HV_X64_MSR_TSC_EMULATION_STATUS
authorVitaly Kuznetsov <vkuznets@redhat.com>
Tue, 16 Mar 2021 14:37:33 +0000 (15:37 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 17 Mar 2021 08:02:49 +0000 (04:02 -0400)
commitd2547cf59793168b564372d75620897416cbaf87
tree1264c35869727553862346deffbefb48f3d35b8d
parent08889894cc82bc3b213bdb192f274358e5a6b78d
KVM: x86: hyper-v: Limit guest to writing zero to HV_X64_MSR_TSC_EMULATION_STATUS

HV_X64_MSR_TSC_EMULATION_STATUS indicates whether TSC accesses are emulated
after migration (to accommodate for a different host TSC frequency when TSC
scaling is not supported; we don't implement this in KVM). Guest can use
the same MSR to stop TSC access emulation by writing zero. Writing anything
else is forbidden.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210316143736.964151-2-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/hyperv.c