]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: allow defining return-0 static calls
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 15 Feb 2022 18:07:10 +0000 (13:07 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 18 Feb 2022 17:44:22 +0000 (12:44 -0500)
commit3fbf5aa3b1f0975097323e4708d656dc9f99a8ab
tree21110cf9b519a8c4de6fb799ed7db0ffdb4117a5
parent966df9188ba8e5eb338971419893f46ac61bbffb
KVM: x86: allow defining return-0 static calls

A few vendor callbacks are only used by VMX, but they return an integer
or bool value.  Introduce KVM_X86_OP_OPTIONAL_RET0 for them: if a func is
NULL in struct kvm_x86_ops, it will be changed to __static_call_return0
when updating static calls.

Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/asm/kvm-x86-ops.h
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm/avic.c
arch/x86/kvm/svm/svm.c
arch/x86/kvm/x86.c
kernel/static_call.c