]> git.itanic.dy.fi Git - linux-stable/commit
KVM: selftests: Test that values written to Hyper-V MSRs are preserved
authorVitaly Kuznetsov <vkuznets@redhat.com>
Thu, 13 Oct 2022 09:58:48 +0000 (11:58 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 28 Dec 2022 11:08:23 +0000 (06:08 -0500)
commitd8589154363f10ce15bedfc1bd4c6cb2a002d33d
treea2b1b30999a4887f6abe1eb8fc824d7e62ad9f2b
parente03b7b51e9a53a865202735b6e0c83a7ea3fc53b
KVM: selftests: Test that values written to Hyper-V MSRs are preserved

Enhance 'hyperv_features' selftest by adding a check that KVM
preserves values written to PV MSRs. Two MSRs are, however, 'special':
- HV_X64_MSR_EOI as it is a 'write-only' MSR,
- HV_X64_MSR_RESET as it always reads as '0'.
The later doesn't require any special handling right now because the
test never writes anything besides '0' to the MSR, leave a TODO node
about the fact.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20221013095849.705943-7-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/x86_64/hyperv_features.c