OSDN Git Service

selftests: kvm/x86: Test the flags in MSR filtering and MSR exiting
authorAaron Lewis <aaronlewis@google.com>
Wed, 21 Sep 2022 15:15:25 +0000 (15:15 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 9 Nov 2022 17:31:30 +0000 (12:31 -0500)
commitf7d64772712350fd35f1d76d16dec030a81029eb
tree9ca3571aaec8e07926cfdd777c7ce29228795422
parent8aff460f216753d86ab90ddbcab0125ab2400335
selftests: kvm/x86: Test the flags in MSR filtering and MSR exiting

When using the flags in KVM_X86_SET_MSR_FILTER and
KVM_CAP_X86_USER_SPACE_MSR it is expected that an attempt to write to
any of the unused bits will fail.  Add testing to walk over every bit
in each of the flag fields in MSR filtering and MSR exiting to verify
that unused bits return and error and used bits, i.e. valid bits,
succeed.

Signed-off-by: Aaron Lewis <aaronlewis@google.com>
Message-Id: <20220921151525.904162-6-aaronlewis@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tools/testing/selftests/kvm/x86_64/userspace_msr_exit_test.c