]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Move kvm_ops_static_call_update() to x86.c
authorLike Xu <likexu@tencent.com>
Tue, 29 Mar 2022 23:50:51 +0000 (23:50 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 13 Apr 2022 17:37:44 +0000 (13:37 -0400)
commit6f240dedfc13706043ffc753c57f2784e4ce4bbc
tree0582fd438fe70aa0a8a85a3576c91f9fb43e8c6e
parent577bdffa6f09e4acd461e78d91e7efd26e6dd8a4
KVM: x86: Move kvm_ops_static_call_update() to x86.c

The kvm_ops_static_call_update() is defined in kvm_host.h. That's
completely unnecessary, it should have exactly one caller,
kvm_arch_hardware_setup().  Move the helper to x86.c and have it do the
actual memcpy() of the ops in addition to the static call updates.  This
will also allow for cleanly giving kvm_pmu_ops static_call treatment.

Suggested-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Like Xu <likexu@tencent.com>
[sean: Move memcpy() into the helper and rename accordingly]
Signed-off-by: Sean Christopherson <seanjc@google.com>
Message-Id: <20220329235054.3534728-2-seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/x86.c