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:Aaron Lewis <aaronlewis@google.com> Tested-by:
Aaron Lewis <aaronlewis@google.com> Link: https://lore.kernel.org/r/20230405004520.421768-5-seanjc@google.comSigned-off-by:
Sean Christopherson <seanjc@google.com>
Showing
Please register or sign in to comment