• Sean Christopherson's avatar
    KVM: selftests: Add kvm_has_cap() to provide syntactic sugar · 3ea9b809
    Sean Christopherson authored
    Add kvm_has_cap() to wrap kvm_check_cap() and return a bool for the use
    cases where the caller only wants check if a capability is supported,
    i.e. doesn't care about the value beyond whether or not it's non-zero.
    The "check" terminology is somewhat ambiguous as the non-boolean return
    suggests that '0' might mean "success", i.e. suggests that the ioctl uses
    the 0/-errno pattern.  Provide a wrapper instead of trying to find a new
    name for the raw helper; the "check" terminology is derived from the name
    of the ioctl, so using e.g. "get" isn't a clear win.
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    3ea9b809
debug_regs.c 6.48 KB