]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: nSVM: disallow userspace setting of MSR_AMD64_TSC_RATIO to non default...
authorMaxim Levitsky <mlevitsk@redhat.com>
Wed, 23 Feb 2022 11:56:49 +0000 (13:56 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Feb 2022 18:04:47 +0000 (13:04 -0500)
commit6a3c6c488db7cd880ac63766f3729342e56d098f
tree4ff0d732247af754aa78461f9206dd3afd157943
parent7f3c77a56816fe81655222be2bfe6724969c4585
KVM: x86: nSVM: disallow userspace setting of MSR_AMD64_TSC_RATIO to non default value when tsc scaling disabled

If nested tsc scaling is disabled, MSR_AMD64_TSC_RATIO should
never have non default value.

Due to way nested tsc scaling support was implmented in qemu,
it would set this msr to 0 when nested tsc scaling was disabled.
Ignore that value for now, as it causes no harm.

Fixes: 2a2ef63e0cee ("KVM: x86: nSVM: implement nested TSC scaling")
Cc: stable@vger.kernel.org
Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
Message-Id: <20220223115649.319134-1-mlevitsk@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c