]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: x86: Disallow changing MSR_PLATFORM_INFO after vCPU has run
authorSean Christopherson <seanjc@google.com>
Fri, 2 Aug 2024 18:55:04 +0000 (11:55 -0700)
committerSean Christopherson <seanjc@google.com>
Fri, 1 Nov 2024 16:22:30 +0000 (09:22 -0700)
commitbc2ca3680b30869ee9a764ab72c143070f1afec8
treebeb916757b4aad1851ee4f81b966a625016db1ed
parent2142ac663a6a72ac868d0768681b1355e3a703eb
KVM: x86: Disallow changing MSR_PLATFORM_INFO after vCPU has run

Tag MSR_PLATFORM_INFO as a feature MSR (because it is), i.e. disallow it
from being modified after the vCPU has run.

To make KVM's selftest compliant, simply delete the userspace MSR write
that restores KVM's original value at the end of the test.  Verifying that
userspace can write back what it originally read is uninteresting in this
particular case, because KVM doesn't enforce _any_ bits in the MSR, i.e.
userspace should be able to write any arbitrary value.

Link: https://lore.kernel.org/r/20240802185511.305849-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/x86.c
tools/testing/selftests/kvm/x86_64/platform_info_test.c