xref: /linux/arch/x86/include/asm/kvm-x86-nested-ops.h (revision 67f8bc848ee31831336bd478e57d2f993551902e)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #if !defined(KVM_X86_NESTED_OP) || \
3     !defined(KVM_X86_NESTED_OP_OPTIONAL) || \
4     !defined(KVM_X86_NESTED_OP_OPTIONAL_RET0)
5 #error Missing one or more KVM_X86_NESTED_OP #defines
6 #else
7 /*
8  * KVM_X86_NESTED_OP() and KVM_X86_NESTED_OP_OPTIONAL() are used to help
9  * generate both DECLARE/DEFINE_STATIC_CALL() invocations and
10  * "static_call_update()" calls.
11  *
12  * KVM_X86_NESTED_OP_OPTIONAL() can be used for those functions that can have
13  * a NULL definition.  KVM_X86_NESTED_OP_OPTIONAL_RET0() can be used likewise
14  * to make a definition optional, but in this case the default will
15  * be __static_call_return0.
16  */
17 KVM_X86_NESTED_OP(leave_nested)
18 KVM_X86_NESTED_OP(is_exception_vmexit)
19 KVM_X86_NESTED_OP(check_events)
20 KVM_X86_NESTED_OP_OPTIONAL_RET0(has_events)
21 KVM_X86_NESTED_OP(triple_fault)
22 KVM_X86_NESTED_OP(get_state)
23 KVM_X86_NESTED_OP(set_state)
24 KVM_X86_NESTED_OP(get_nested_state_pages)
25 KVM_X86_NESTED_OP_OPTIONAL_RET0(write_log_dirty)
26 KVM_X86_NESTED_OP(translate_nested_gpa)
27 #ifdef CONFIG_KVM_HYPERV
28 KVM_X86_NESTED_OP_OPTIONAL(enable_evmcs)
29 KVM_X86_NESTED_OP_OPTIONAL_RET0(get_evmcs_version)
30 KVM_X86_NESTED_OP(hv_inject_synthetic_vmexit_post_tlb_flush)
31 #endif
32 #endif
33 
34 #undef KVM_X86_NESTED_OP
35 #undef KVM_X86_NESTED_OP_OPTIONAL
36 #undef KVM_X86_NESTED_OP_OPTIONAL_RET0
37