• Sean Christopherson's avatar
    KVM: x86: Shove vp_bitmap handling down into sparse_set_to_vcpu_mask() · 9c52f6b3
    Sean Christopherson authored
    Move the vp_bitmap "allocation" that's needed to handle mismatched vp_index
    values down into sparse_set_to_vcpu_mask() and drop __always_inline from
    said helper.  The need for an intermediate vp_bitmap is a detail that's
    specific to the sparse translation with mismatched VP<=>vCPU indexes and
    does not need to be exposed to the caller.
    
    Regarding the __always_inline, prior to commit f21dd494 ("KVM: x86:
    hyperv: optimize sparse VP set processing") the helper, then named
    hv_vcpu_in_sparse_set(), was a tiny bit of code that effectively boiled
    down to a handful of bit ops.  The __always_inline was understandable, if
    not justifiable.  Since the aforementioned change, sparse_set_to_vcpu_mask()
    is a chunky 350-450+ bytes of code without KASAN=y, and balloons to 1100+
    with KASAN=y.  In other words, it has no business being forcefully inlined.
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Reviewed-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
    Message-Id: <20211207220926.718794-7-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    9c52f6b3
hyperv.c 67.1 KB