OSDN Git Service

KVM: selftests: Verify KVM preserves userspace writes to "durable" MSRs
authorSean Christopherson <seanjc@google.com>
Sat, 11 Mar 2023 00:46:09 +0000 (16:46 -0800)
committerSean Christopherson <seanjc@google.com>
Thu, 6 Apr 2023 21:58:44 +0000 (14:58 -0700)
commitf138258565d18f0f9a8d07f04162c68eee997ce6
tree6547c492bfab8c9196038e1d7e1d60c4b6704118
parent22234c2495eafd6b8f1f26c6c6adc12aca60fd7f
KVM: selftests: Verify KVM preserves userspace writes to "durable" MSRs

Assert that KVM provides "read what you wrote" semantics for all "durable"
MSRs (for lack of a better name).  The extra coverage is cheap from a
runtime performance perspective, and verifying the behavior in the common
helper avoids gratuitous copy+paste in individual tests.

Note, this affects all tests that set MSRs from userspace!

Link: https://lore.kernel.org/r/20230311004618.920745-13-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/x86_64/processor.h