• Sean Christopherson's avatar
    KVM: Rename symbols related to enabling virtualization hardware · 70c01943
    Sean Christopherson authored
    Rename the various functions (and a variable) that enable virtualization
    to prepare for upcoming changes, and to clean up artifacts of KVM's
    previous behavior, which required manually juggling locks around
    kvm_usage_count.
    
    Drop the "nolock" qualifier from per-CPU functions now that there are no
    "nolock" implementations of the "all" variants, i.e. now that calling a
    non-nolock function from a nolock function isn't confusing (unlike this
    sentence).
    
    Drop "all" from the outer helpers as they no longer manually iterate
    over all CPUs, and because it might not be obvious what "all" refers to.
    
    In lieu of the above qualifiers, append "_cpu" to the end of the functions
    that are per-CPU helpers for the outer APIs.
    
    Opportunistically prepend "kvm" to all functions to help make it clear
    that they are KVM helpers, but mostly because there's no reason not to.
    
    Lastly, use "virtualization" instead of "hardware", because while the
    functions do enable virtualization in hardware, there are a _lot_ of
    things that KVM enables in hardware.
    
    Defer renaming the arch hooks to future patches, purely to reduce the
    amount of churn in a single commit.
    Reviewed-by: default avatarChao Gao <chao.gao@intel.com>
    Reviewed-by: default avatarKai Huang <kai.huang@intel.com>
    Acked-by: default avatarKai Huang <kai.huang@intel.com>
    Tested-by: default avatarFarrah Chen <farrah.chen@intel.com>
    Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
    Message-ID: <20240830043600.127750-4-seanjc@google.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    70c01943
kvm_main.c 167 KB