Skip to content
Commit 7040e54f authored by Sean Christopherson's avatar Sean Christopherson
Browse files

KVM: selftests: Rework dynamic XFeature helper to take mask, not bit



Take the XFeature mask in __vm_xsave_require_permission() instead of the
bit so that there's no need to define macros for both the bit and the
mask.  Asserting that only a single bit is set and retrieving said bit
is easy enough via log2 helpers.

Opportunistically clean up the error message for the
ARCH_REQ_XCOMP_GUEST_PERM sanity check.

Reviewed-by: default avatarAaron Lewis <aaronlewis@google.com>
Tested-by: default avatarAaron Lewis <aaronlewis@google.com>
Link: https://lore.kernel.org/r/20230405004520.421768-5-seanjc@google.com


Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
parent b213812d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment