diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2022-02-15 13:07:10 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2022-02-18 12:44:22 -0500 |
commit | 5be2226f417d5b06d17e6c52d6e341cf43c29e48 (patch) | |
tree | 21110cf9b519a8c4de6fb799ed7db0ffdb4117a5 /kernel/static_call.c | |
parent | abb6d479e22642c82d552970d85edd9b5fe8beb6 (diff) | |
download | lwn-5be2226f417d5b06d17e6c52d6e341cf43c29e48.tar.gz lwn-5be2226f417d5b06d17e6c52d6e341cf43c29e48.zip |
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>
Diffstat (limited to 'kernel/static_call.c')
-rw-r--r-- | kernel/static_call.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/static_call.c b/kernel/static_call.c index 43ba0b1e0edb..f2b8baea35d2 100644 --- a/kernel/static_call.c +++ b/kernel/static_call.c @@ -503,6 +503,7 @@ long __static_call_return0(void) { return 0; } +EXPORT_SYMBOL_GPL(__static_call_return0); #ifdef CONFIG_STATIC_CALL_SELFTEST |