162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci#if !defined(KVM_X86_OP) || !defined(KVM_X86_OP_OPTIONAL)
362306a36Sopenharmony_ciBUILD_BUG_ON(1)
462306a36Sopenharmony_ci#endif
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci/*
762306a36Sopenharmony_ci * KVM_X86_OP() and KVM_X86_OP_OPTIONAL() are used to help generate
862306a36Sopenharmony_ci * both DECLARE/DEFINE_STATIC_CALL() invocations and
962306a36Sopenharmony_ci * "static_call_update()" calls.
1062306a36Sopenharmony_ci *
1162306a36Sopenharmony_ci * KVM_X86_OP_OPTIONAL() can be used for those functions that can have
1262306a36Sopenharmony_ci * a NULL definition, for example if "static_call_cond()" will be used
1362306a36Sopenharmony_ci * at the call sites.  KVM_X86_OP_OPTIONAL_RET0() can be used likewise
1462306a36Sopenharmony_ci * to make a definition optional, but in this case the default will
1562306a36Sopenharmony_ci * be __static_call_return0.
1662306a36Sopenharmony_ci */
1762306a36Sopenharmony_ciKVM_X86_OP(check_processor_compatibility)
1862306a36Sopenharmony_ciKVM_X86_OP(hardware_enable)
1962306a36Sopenharmony_ciKVM_X86_OP(hardware_disable)
2062306a36Sopenharmony_ciKVM_X86_OP(hardware_unsetup)
2162306a36Sopenharmony_ciKVM_X86_OP(has_emulated_msr)
2262306a36Sopenharmony_ciKVM_X86_OP(vcpu_after_set_cpuid)
2362306a36Sopenharmony_ciKVM_X86_OP(vm_init)
2462306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(vm_destroy)
2562306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL_RET0(vcpu_precreate)
2662306a36Sopenharmony_ciKVM_X86_OP(vcpu_create)
2762306a36Sopenharmony_ciKVM_X86_OP(vcpu_free)
2862306a36Sopenharmony_ciKVM_X86_OP(vcpu_reset)
2962306a36Sopenharmony_ciKVM_X86_OP(prepare_switch_to_guest)
3062306a36Sopenharmony_ciKVM_X86_OP(vcpu_load)
3162306a36Sopenharmony_ciKVM_X86_OP(vcpu_put)
3262306a36Sopenharmony_ciKVM_X86_OP(update_exception_bitmap)
3362306a36Sopenharmony_ciKVM_X86_OP(get_msr)
3462306a36Sopenharmony_ciKVM_X86_OP(set_msr)
3562306a36Sopenharmony_ciKVM_X86_OP(get_segment_base)
3662306a36Sopenharmony_ciKVM_X86_OP(get_segment)
3762306a36Sopenharmony_ciKVM_X86_OP(get_cpl)
3862306a36Sopenharmony_ciKVM_X86_OP(set_segment)
3962306a36Sopenharmony_ciKVM_X86_OP(get_cs_db_l_bits)
4062306a36Sopenharmony_ciKVM_X86_OP(is_valid_cr0)
4162306a36Sopenharmony_ciKVM_X86_OP(set_cr0)
4262306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(post_set_cr3)
4362306a36Sopenharmony_ciKVM_X86_OP(is_valid_cr4)
4462306a36Sopenharmony_ciKVM_X86_OP(set_cr4)
4562306a36Sopenharmony_ciKVM_X86_OP(set_efer)
4662306a36Sopenharmony_ciKVM_X86_OP(get_idt)
4762306a36Sopenharmony_ciKVM_X86_OP(set_idt)
4862306a36Sopenharmony_ciKVM_X86_OP(get_gdt)
4962306a36Sopenharmony_ciKVM_X86_OP(set_gdt)
5062306a36Sopenharmony_ciKVM_X86_OP(sync_dirty_debug_regs)
5162306a36Sopenharmony_ciKVM_X86_OP(set_dr7)
5262306a36Sopenharmony_ciKVM_X86_OP(cache_reg)
5362306a36Sopenharmony_ciKVM_X86_OP(get_rflags)
5462306a36Sopenharmony_ciKVM_X86_OP(set_rflags)
5562306a36Sopenharmony_ciKVM_X86_OP(get_if_flag)
5662306a36Sopenharmony_ciKVM_X86_OP(flush_tlb_all)
5762306a36Sopenharmony_ciKVM_X86_OP(flush_tlb_current)
5862306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(flush_remote_tlbs)
5962306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(flush_remote_tlbs_range)
6062306a36Sopenharmony_ciKVM_X86_OP(flush_tlb_gva)
6162306a36Sopenharmony_ciKVM_X86_OP(flush_tlb_guest)
6262306a36Sopenharmony_ciKVM_X86_OP(vcpu_pre_run)
6362306a36Sopenharmony_ciKVM_X86_OP(vcpu_run)
6462306a36Sopenharmony_ciKVM_X86_OP(handle_exit)
6562306a36Sopenharmony_ciKVM_X86_OP(skip_emulated_instruction)
6662306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(update_emulated_instruction)
6762306a36Sopenharmony_ciKVM_X86_OP(set_interrupt_shadow)
6862306a36Sopenharmony_ciKVM_X86_OP(get_interrupt_shadow)
6962306a36Sopenharmony_ciKVM_X86_OP(patch_hypercall)
7062306a36Sopenharmony_ciKVM_X86_OP(inject_irq)
7162306a36Sopenharmony_ciKVM_X86_OP(inject_nmi)
7262306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL_RET0(is_vnmi_pending)
7362306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL_RET0(set_vnmi_pending)
7462306a36Sopenharmony_ciKVM_X86_OP(inject_exception)
7562306a36Sopenharmony_ciKVM_X86_OP(cancel_injection)
7662306a36Sopenharmony_ciKVM_X86_OP(interrupt_allowed)
7762306a36Sopenharmony_ciKVM_X86_OP(nmi_allowed)
7862306a36Sopenharmony_ciKVM_X86_OP(get_nmi_mask)
7962306a36Sopenharmony_ciKVM_X86_OP(set_nmi_mask)
8062306a36Sopenharmony_ciKVM_X86_OP(enable_nmi_window)
8162306a36Sopenharmony_ciKVM_X86_OP(enable_irq_window)
8262306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(update_cr8_intercept)
8362306a36Sopenharmony_ciKVM_X86_OP(refresh_apicv_exec_ctrl)
8462306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(hwapic_irr_update)
8562306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(hwapic_isr_update)
8662306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL_RET0(guest_apic_has_interrupt)
8762306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(load_eoi_exitmap)
8862306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(set_virtual_apic_mode)
8962306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(set_apic_access_page_addr)
9062306a36Sopenharmony_ciKVM_X86_OP(deliver_interrupt)
9162306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(sync_pir_to_irr)
9262306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL_RET0(set_tss_addr)
9362306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL_RET0(set_identity_map_addr)
9462306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL_RET0(get_mt_mask)
9562306a36Sopenharmony_ciKVM_X86_OP(load_mmu_pgd)
9662306a36Sopenharmony_ciKVM_X86_OP(has_wbinvd_exit)
9762306a36Sopenharmony_ciKVM_X86_OP(get_l2_tsc_offset)
9862306a36Sopenharmony_ciKVM_X86_OP(get_l2_tsc_multiplier)
9962306a36Sopenharmony_ciKVM_X86_OP(write_tsc_offset)
10062306a36Sopenharmony_ciKVM_X86_OP(write_tsc_multiplier)
10162306a36Sopenharmony_ciKVM_X86_OP(get_exit_info)
10262306a36Sopenharmony_ciKVM_X86_OP(check_intercept)
10362306a36Sopenharmony_ciKVM_X86_OP(handle_exit_irqoff)
10462306a36Sopenharmony_ciKVM_X86_OP(request_immediate_exit)
10562306a36Sopenharmony_ciKVM_X86_OP(sched_in)
10662306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(update_cpu_dirty_logging)
10762306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(vcpu_blocking)
10862306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(vcpu_unblocking)
10962306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(pi_update_irte)
11062306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(pi_start_assignment)
11162306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(apicv_pre_state_restore)
11262306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(apicv_post_state_restore)
11362306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL_RET0(dy_apicv_has_pending_interrupt)
11462306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(set_hv_timer)
11562306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(cancel_hv_timer)
11662306a36Sopenharmony_ciKVM_X86_OP(setup_mce)
11762306a36Sopenharmony_ci#ifdef CONFIG_KVM_SMM
11862306a36Sopenharmony_ciKVM_X86_OP(smi_allowed)
11962306a36Sopenharmony_ciKVM_X86_OP(enter_smm)
12062306a36Sopenharmony_ciKVM_X86_OP(leave_smm)
12162306a36Sopenharmony_ciKVM_X86_OP(enable_smi_window)
12262306a36Sopenharmony_ci#endif
12362306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(mem_enc_ioctl)
12462306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(mem_enc_register_region)
12562306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(mem_enc_unregister_region)
12662306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(vm_copy_enc_context_from)
12762306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(vm_move_enc_context_from)
12862306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(guest_memory_reclaimed)
12962306a36Sopenharmony_ciKVM_X86_OP(get_msr_feature)
13062306a36Sopenharmony_ciKVM_X86_OP(can_emulate_instruction)
13162306a36Sopenharmony_ciKVM_X86_OP(apic_init_signal_blocked)
13262306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(enable_l2_tlb_flush)
13362306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL(migrate_timers)
13462306a36Sopenharmony_ciKVM_X86_OP(msr_filter_changed)
13562306a36Sopenharmony_ciKVM_X86_OP(complete_emulated_msr)
13662306a36Sopenharmony_ciKVM_X86_OP(vcpu_deliver_sipi_vector)
13762306a36Sopenharmony_ciKVM_X86_OP_OPTIONAL_RET0(vcpu_get_apicv_inhibit_reasons);
13862306a36Sopenharmony_ci
13962306a36Sopenharmony_ci#undef KVM_X86_OP
14062306a36Sopenharmony_ci#undef KVM_X86_OP_OPTIONAL
14162306a36Sopenharmony_ci#undef KVM_X86_OP_OPTIONAL_RET0
142