KVM: x86: Move .pmu_ops to kvm_x86_init_ops and tag as __initdata
The pmu_ops should be moved to kvm_x86_init_ops and tagged as __initdata. That'll save those precious few bytes, and more importantly make the original ops unreachable, i.e. make it harder to sneak in post-init modification bugs. Suggested-by:Sean Christopherson <seanjc@google.com> Signed-off-by:
Like Xu <likexu@tencent.com> Reviewed-by:
Sean Christopherson <seanjc@google.com> Signed-off-by:
Sean Christopherson <seanjc@google.com> Message-Id: <20220329235054.3534728-4-seanjc@google.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Showing
- arch/x86/include/asm/kvm_host.h 1 addition, 2 deletionsarch/x86/include/asm/kvm_host.h
- arch/x86/kvm/svm/pmu.c 1 addition, 1 deletionarch/x86/kvm/svm/pmu.c
- arch/x86/kvm/svm/svm.c 1 addition, 1 deletionarch/x86/kvm/svm/svm.c
- arch/x86/kvm/vmx/pmu_intel.c 1 addition, 1 deletionarch/x86/kvm/vmx/pmu_intel.c
- arch/x86/kvm/vmx/vmx.c 1 addition, 1 deletionarch/x86/kvm/vmx/vmx.c
- arch/x86/kvm/x86.c 1 addition, 1 deletionarch/x86/kvm/x86.c
Loading
Please register or sign in to comment