Commit | Line | Data |
---|---|---|
9af5471b | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
e4fc23ba | 2 | #if !defined(KVM_X86_OP) || !defined(KVM_X86_OP_OPTIONAL) |
9af5471b JB |
3 | BUILD_BUG_ON(1) |
4 | #endif | |
5 | ||
6 | /* | |
e4fc23ba PB |
7 | * KVM_X86_OP() and KVM_X86_OP_OPTIONAL() are used to help generate |
8 | * both DECLARE/DEFINE_STATIC_CALL() invocations and | |
9 | * "static_call_update()" calls. | |
10 | * | |
11 | * KVM_X86_OP_OPTIONAL() can be used for those functions that can have | |
12 | * a NULL definition, for example if "static_call_cond()" will be used | |
5be2226f PB |
13 | * at the call sites. KVM_X86_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. | |
9af5471b | 16 | */ |
e4fc23ba PB |
17 | KVM_X86_OP(hardware_enable) |
18 | KVM_X86_OP(hardware_disable) | |
19 | KVM_X86_OP(hardware_unsetup) | |
9af5471b JB |
20 | KVM_X86_OP(has_emulated_msr) |
21 | KVM_X86_OP(vcpu_after_set_cpuid) | |
22 | KVM_X86_OP(vm_init) | |
e4fc23ba | 23 | KVM_X86_OP_OPTIONAL(vm_destroy) |
9af5471b JB |
24 | KVM_X86_OP(vcpu_create) |
25 | KVM_X86_OP(vcpu_free) | |
26 | KVM_X86_OP(vcpu_reset) | |
e27bc044 | 27 | KVM_X86_OP(prepare_switch_to_guest) |
9af5471b JB |
28 | KVM_X86_OP(vcpu_load) |
29 | KVM_X86_OP(vcpu_put) | |
30 | KVM_X86_OP(update_exception_bitmap) | |
31 | KVM_X86_OP(get_msr) | |
32 | KVM_X86_OP(set_msr) | |
33 | KVM_X86_OP(get_segment_base) | |
34 | KVM_X86_OP(get_segment) | |
35 | KVM_X86_OP(get_cpl) | |
36 | KVM_X86_OP(set_segment) | |
e4fc23ba | 37 | KVM_X86_OP(get_cs_db_l_bits) |
9af5471b | 38 | KVM_X86_OP(set_cr0) |
e4fc23ba | 39 | KVM_X86_OP_OPTIONAL(post_set_cr3) |
9af5471b JB |
40 | KVM_X86_OP(is_valid_cr4) |
41 | KVM_X86_OP(set_cr4) | |
42 | KVM_X86_OP(set_efer) | |
43 | KVM_X86_OP(get_idt) | |
44 | KVM_X86_OP(set_idt) | |
45 | KVM_X86_OP(get_gdt) | |
46 | KVM_X86_OP(set_gdt) | |
47 | KVM_X86_OP(sync_dirty_debug_regs) | |
48 | KVM_X86_OP(set_dr7) | |
49 | KVM_X86_OP(cache_reg) | |
50 | KVM_X86_OP(get_rflags) | |
51 | KVM_X86_OP(set_rflags) | |
c5063551 | 52 | KVM_X86_OP(get_if_flag) |
e27bc044 SC |
53 | KVM_X86_OP(flush_tlb_all) |
54 | KVM_X86_OP(flush_tlb_current) | |
e4fc23ba PB |
55 | KVM_X86_OP_OPTIONAL(tlb_remote_flush) |
56 | KVM_X86_OP_OPTIONAL(tlb_remote_flush_with_range) | |
e27bc044 SC |
57 | KVM_X86_OP(flush_tlb_gva) |
58 | KVM_X86_OP(flush_tlb_guest) | |
fc4fad79 | 59 | KVM_X86_OP(vcpu_pre_run) |
e27bc044 | 60 | KVM_X86_OP(vcpu_run) |
e4fc23ba PB |
61 | KVM_X86_OP(handle_exit) |
62 | KVM_X86_OP(skip_emulated_instruction) | |
63 | KVM_X86_OP_OPTIONAL(update_emulated_instruction) | |
9af5471b JB |
64 | KVM_X86_OP(set_interrupt_shadow) |
65 | KVM_X86_OP(get_interrupt_shadow) | |
66 | KVM_X86_OP(patch_hypercall) | |
e27bc044 SC |
67 | KVM_X86_OP(inject_irq) |
68 | KVM_X86_OP(inject_nmi) | |
9af5471b JB |
69 | KVM_X86_OP(queue_exception) |
70 | KVM_X86_OP(cancel_injection) | |
71 | KVM_X86_OP(interrupt_allowed) | |
72 | KVM_X86_OP(nmi_allowed) | |
73 | KVM_X86_OP(get_nmi_mask) | |
74 | KVM_X86_OP(set_nmi_mask) | |
75 | KVM_X86_OP(enable_nmi_window) | |
76 | KVM_X86_OP(enable_irq_window) | |
e4fc23ba | 77 | KVM_X86_OP_OPTIONAL(update_cr8_intercept) |
9af5471b | 78 | KVM_X86_OP(check_apicv_inhibit_reasons) |
9af5471b | 79 | KVM_X86_OP(refresh_apicv_exec_ctrl) |
abb6d479 PB |
80 | KVM_X86_OP_OPTIONAL(hwapic_irr_update) |
81 | KVM_X86_OP_OPTIONAL(hwapic_isr_update) | |
5be2226f | 82 | KVM_X86_OP_OPTIONAL_RET0(guest_apic_has_interrupt) |
abb6d479 PB |
83 | KVM_X86_OP_OPTIONAL(load_eoi_exitmap) |
84 | KVM_X86_OP_OPTIONAL(set_virtual_apic_mode) | |
e4fc23ba | 85 | KVM_X86_OP_OPTIONAL(set_apic_access_page_addr) |
57dfd7b5 | 86 | KVM_X86_OP(deliver_interrupt) |
e4fc23ba | 87 | KVM_X86_OP_OPTIONAL(sync_pir_to_irr) |
5be2226f PB |
88 | KVM_X86_OP_OPTIONAL_RET0(set_tss_addr) |
89 | KVM_X86_OP_OPTIONAL_RET0(set_identity_map_addr) | |
bf07be36 | 90 | KVM_X86_OP(get_mt_mask) |
9af5471b | 91 | KVM_X86_OP(load_mmu_pgd) |
e4fc23ba | 92 | KVM_X86_OP(has_wbinvd_exit) |
307a94c7 IS |
93 | KVM_X86_OP(get_l2_tsc_offset) |
94 | KVM_X86_OP(get_l2_tsc_multiplier) | |
edcfe540 | 95 | KVM_X86_OP(write_tsc_offset) |
1ab9287a | 96 | KVM_X86_OP(write_tsc_multiplier) |
9af5471b JB |
97 | KVM_X86_OP(get_exit_info) |
98 | KVM_X86_OP(check_intercept) | |
99 | KVM_X86_OP(handle_exit_irqoff) | |
e4fc23ba | 100 | KVM_X86_OP(request_immediate_exit) |
9af5471b | 101 | KVM_X86_OP(sched_in) |
e4fc23ba PB |
102 | KVM_X86_OP_OPTIONAL(update_cpu_dirty_logging) |
103 | KVM_X86_OP_OPTIONAL(vcpu_blocking) | |
104 | KVM_X86_OP_OPTIONAL(vcpu_unblocking) | |
105 | KVM_X86_OP_OPTIONAL(pi_update_irte) | |
106 | KVM_X86_OP_OPTIONAL(pi_start_assignment) | |
abb6d479 | 107 | KVM_X86_OP_OPTIONAL(apicv_post_state_restore) |
5be2226f | 108 | KVM_X86_OP_OPTIONAL_RET0(dy_apicv_has_pending_interrupt) |
e4fc23ba PB |
109 | KVM_X86_OP_OPTIONAL(set_hv_timer) |
110 | KVM_X86_OP_OPTIONAL(cancel_hv_timer) | |
9af5471b JB |
111 | KVM_X86_OP(setup_mce) |
112 | KVM_X86_OP(smi_allowed) | |
ecc513e5 SC |
113 | KVM_X86_OP(enter_smm) |
114 | KVM_X86_OP(leave_smm) | |
9af5471b | 115 | KVM_X86_OP(enable_smi_window) |
e4fc23ba PB |
116 | KVM_X86_OP_OPTIONAL(mem_enc_ioctl) |
117 | KVM_X86_OP_OPTIONAL(mem_enc_register_region) | |
118 | KVM_X86_OP_OPTIONAL(mem_enc_unregister_region) | |
119 | KVM_X86_OP_OPTIONAL(vm_copy_enc_context_from) | |
120 | KVM_X86_OP_OPTIONAL(vm_move_enc_context_from) | |
9af5471b JB |
121 | KVM_X86_OP(get_msr_feature) |
122 | KVM_X86_OP(can_emulate_instruction) | |
123 | KVM_X86_OP(apic_init_signal_blocked) | |
e4fc23ba PB |
124 | KVM_X86_OP_OPTIONAL(enable_direct_tlbflush) |
125 | KVM_X86_OP_OPTIONAL(migrate_timers) | |
9af5471b | 126 | KVM_X86_OP(msr_filter_changed) |
e4fc23ba | 127 | KVM_X86_OP(complete_emulated_msr) |
a0941a64 | 128 | KVM_X86_OP(vcpu_deliver_sipi_vector) |
9af5471b JB |
129 | |
130 | #undef KVM_X86_OP | |
e4fc23ba | 131 | #undef KVM_X86_OP_OPTIONAL |
5be2226f | 132 | #undef KVM_X86_OP_OPTIONAL_RET0 |