On 15/01/21 10:26, Peter Zijlstra wrote:
+#define KVM_X86_OP(func)                                            \
+       DEFINE_STATIC_CALL_NULL(kvm_x86_##func,                      \
+                               *(((struct kvm_x86_ops *)0)->func));
+#define KVM_X86_OP_NULL KVM_X86_OP
+#include <asm/kvm-x86-ops.h>
+EXPORT_STATIC_CALL_GPL(kvm_x86_get_cs_db_l_bits);
+EXPORT_STATIC_CALL_GPL(kvm_x86_cache_reg);
+EXPORT_STATIC_CALL_GPL(kvm_x86_tlb_flush_current);
Would something like:

   
https://lkml.kernel.org/r/[email protected]

Be useful? That way modules can call the static_call() but not change
it.


Maybe not in these cases, but in general there may be cases where we later want to change the static_call (for example replacing jump labels with static_calls).

Paolo

Reply via email to