diff options
author | Sean Christopherson <seanjc@google.com> | 2022-06-14 20:07:05 +0000 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2022-07-13 18:14:24 -0700 |
commit | 090cd45b21cd0d26297315d4bd9b83d9dcad10e1 (patch) | |
tree | 6c079900a09787f0eda837f2450e27cd1cc1cd50 /tools/testing/selftests/kvm/include/x86_64/processor.h | |
parent | d4c94ee8121cce64f2882f3bdcc346dc3d01bcdd (diff) | |
download | linux-090cd45b21cd0d26297315d4bd9b83d9dcad10e1.tar.bz2 |
KVM: selftests: Clean up requirements for XFD-aware XSAVE features
Provide informative error messages for the various checks related to
requesting access to XSAVE features that are buried behind XSAVE Feature
Disabling (XFD).
Opportunistically rename the helper to have "require" in the name so that
it's somewhat obvious that the helper may skip the test.
Signed-off-by: Sean Christopherson <seanjc@google.com>
Link: https://lore.kernel.org/r/20220614200707.3315957-41-seanjc@google.com
Diffstat (limited to 'tools/testing/selftests/kvm/include/x86_64/processor.h')
-rw-r--r-- | tools/testing/selftests/kvm/include/x86_64/processor.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/include/x86_64/processor.h b/tools/testing/selftests/kvm/include/x86_64/processor.h index 559840e47f01..4060fe954d53 100644 --- a/tools/testing/selftests/kvm/include/x86_64/processor.h +++ b/tools/testing/selftests/kvm/include/x86_64/processor.h @@ -832,7 +832,10 @@ void vm_set_page_table_entry(struct kvm_vm *vm, struct kvm_vcpu *vcpu, uint64_t kvm_hypercall(uint64_t nr, uint64_t a0, uint64_t a1, uint64_t a2, uint64_t a3); -void vm_xsave_req_perm(int bit); +void __vm_xsave_require_permission(int bit, const char *name); + +#define vm_xsave_require_permission(perm) \ + __vm_xsave_require_permission(perm, #perm) enum pg_level { PG_LEVEL_NONE, |