]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Forbid VMM to set SYNIC/STIMER MSRs when SynIC wasn't activated
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 25 Mar 2022 13:21:40 +0000 (14:21 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 29 Mar 2022 17:22:07 +0000 (13:22 -0400)
commit3b76dda8baa9e9ccfd3bba65db1cffc052a3470e
tree8c8a40aee36f06cdbedcd0a33e9335b4e4dda67c
parentf36ff1cd62f49ca0f72c805fd3cf552c5818d5ce
KVM: x86: Forbid VMM to set SYNIC/STIMER MSRs when SynIC wasn't activated

Setting non-zero values to SYNIC/STIMER MSRs activates certain features,
this should not happen when KVM_CAP_HYPERV_SYNIC{,2} was not activated.

Note, it would've been better to forbid writing anything to SYNIC/STIMER
MSRs, including zeroes, however, at least QEMU tries clearing
HV_X64_MSR_STIMER0_CONFIG without SynIC. HV_X64_MSR_EOM MSR is somewhat
'special' as writing zero there triggers an action, this also should not
happen when SynIC wasn't activated.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20220325132140.25650-4-vkuznets@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/hyperv.c