• Sean Christopherson's avatar
    KVM: x86: Use static_call() for copy/move encryption context ioctls() · 7ad02ef0
    Sean Christopherson authored
    Define and use static_call()s for .vm_{copy,move}_enc_context_from(),
    mostly so that the op is defined in kvm-x86-ops.h.  This will allow using
    KVM_X86_OP in vendor code to wire up the implementation.  Any performance
    gains eeked out by using static_call() is a happy bonus and not the
    primary motiviation.
    
    Opportunistically refactor the code to reduce indentation and keep line
    lengths reasonable, and to be consistent when wrapping versus running
    a bit over the 80 char soft limit.
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-Id: <20220128005208.4008533-12-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    7ad02ef0
x86.c 336 KB