kvm-x86-ops.h (4294B)
1/* SPDX-License-Identifier: GPL-2.0 */ 2#if !defined(KVM_X86_OP) || !defined(KVM_X86_OP_OPTIONAL) 3BUILD_BUG_ON(1) 4#endif 5 6/* 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 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. 16 */ 17KVM_X86_OP(hardware_enable) 18KVM_X86_OP(hardware_disable) 19KVM_X86_OP(hardware_unsetup) 20KVM_X86_OP(has_emulated_msr) 21KVM_X86_OP(vcpu_after_set_cpuid) 22KVM_X86_OP(vm_init) 23KVM_X86_OP_OPTIONAL(vm_destroy) 24KVM_X86_OP(vcpu_create) 25KVM_X86_OP(vcpu_free) 26KVM_X86_OP(vcpu_reset) 27KVM_X86_OP(prepare_switch_to_guest) 28KVM_X86_OP(vcpu_load) 29KVM_X86_OP(vcpu_put) 30KVM_X86_OP(update_exception_bitmap) 31KVM_X86_OP(get_msr) 32KVM_X86_OP(set_msr) 33KVM_X86_OP(get_segment_base) 34KVM_X86_OP(get_segment) 35KVM_X86_OP(get_cpl) 36KVM_X86_OP(set_segment) 37KVM_X86_OP(get_cs_db_l_bits) 38KVM_X86_OP(set_cr0) 39KVM_X86_OP_OPTIONAL(post_set_cr3) 40KVM_X86_OP(is_valid_cr4) 41KVM_X86_OP(set_cr4) 42KVM_X86_OP(set_efer) 43KVM_X86_OP(get_idt) 44KVM_X86_OP(set_idt) 45KVM_X86_OP(get_gdt) 46KVM_X86_OP(set_gdt) 47KVM_X86_OP(sync_dirty_debug_regs) 48KVM_X86_OP(set_dr7) 49KVM_X86_OP(cache_reg) 50KVM_X86_OP(get_rflags) 51KVM_X86_OP(set_rflags) 52KVM_X86_OP(get_if_flag) 53KVM_X86_OP(flush_tlb_all) 54KVM_X86_OP(flush_tlb_current) 55KVM_X86_OP_OPTIONAL(tlb_remote_flush) 56KVM_X86_OP_OPTIONAL(tlb_remote_flush_with_range) 57KVM_X86_OP(flush_tlb_gva) 58KVM_X86_OP(flush_tlb_guest) 59KVM_X86_OP(vcpu_pre_run) 60KVM_X86_OP(vcpu_run) 61KVM_X86_OP(handle_exit) 62KVM_X86_OP(skip_emulated_instruction) 63KVM_X86_OP_OPTIONAL(update_emulated_instruction) 64KVM_X86_OP(set_interrupt_shadow) 65KVM_X86_OP(get_interrupt_shadow) 66KVM_X86_OP(patch_hypercall) 67KVM_X86_OP(inject_irq) 68KVM_X86_OP(inject_nmi) 69KVM_X86_OP(queue_exception) 70KVM_X86_OP(cancel_injection) 71KVM_X86_OP(interrupt_allowed) 72KVM_X86_OP(nmi_allowed) 73KVM_X86_OP(get_nmi_mask) 74KVM_X86_OP(set_nmi_mask) 75KVM_X86_OP(enable_nmi_window) 76KVM_X86_OP(enable_irq_window) 77KVM_X86_OP_OPTIONAL(update_cr8_intercept) 78KVM_X86_OP(check_apicv_inhibit_reasons) 79KVM_X86_OP(refresh_apicv_exec_ctrl) 80KVM_X86_OP_OPTIONAL(hwapic_irr_update) 81KVM_X86_OP_OPTIONAL(hwapic_isr_update) 82KVM_X86_OP_OPTIONAL_RET0(guest_apic_has_interrupt) 83KVM_X86_OP_OPTIONAL(load_eoi_exitmap) 84KVM_X86_OP_OPTIONAL(set_virtual_apic_mode) 85KVM_X86_OP_OPTIONAL(set_apic_access_page_addr) 86KVM_X86_OP(deliver_interrupt) 87KVM_X86_OP_OPTIONAL(sync_pir_to_irr) 88KVM_X86_OP_OPTIONAL_RET0(set_tss_addr) 89KVM_X86_OP_OPTIONAL_RET0(set_identity_map_addr) 90KVM_X86_OP(get_mt_mask) 91KVM_X86_OP(load_mmu_pgd) 92KVM_X86_OP(has_wbinvd_exit) 93KVM_X86_OP(get_l2_tsc_offset) 94KVM_X86_OP(get_l2_tsc_multiplier) 95KVM_X86_OP(write_tsc_offset) 96KVM_X86_OP(write_tsc_multiplier) 97KVM_X86_OP(get_exit_info) 98KVM_X86_OP(check_intercept) 99KVM_X86_OP(handle_exit_irqoff) 100KVM_X86_OP(request_immediate_exit) 101KVM_X86_OP(sched_in) 102KVM_X86_OP_OPTIONAL(update_cpu_dirty_logging) 103KVM_X86_OP_OPTIONAL(vcpu_blocking) 104KVM_X86_OP_OPTIONAL(vcpu_unblocking) 105KVM_X86_OP_OPTIONAL(pi_update_irte) 106KVM_X86_OP_OPTIONAL(pi_start_assignment) 107KVM_X86_OP_OPTIONAL(apicv_post_state_restore) 108KVM_X86_OP_OPTIONAL_RET0(dy_apicv_has_pending_interrupt) 109KVM_X86_OP_OPTIONAL(set_hv_timer) 110KVM_X86_OP_OPTIONAL(cancel_hv_timer) 111KVM_X86_OP(setup_mce) 112KVM_X86_OP(smi_allowed) 113KVM_X86_OP(enter_smm) 114KVM_X86_OP(leave_smm) 115KVM_X86_OP(enable_smi_window) 116KVM_X86_OP_OPTIONAL(mem_enc_ioctl) 117KVM_X86_OP_OPTIONAL(mem_enc_register_region) 118KVM_X86_OP_OPTIONAL(mem_enc_unregister_region) 119KVM_X86_OP_OPTIONAL(vm_copy_enc_context_from) 120KVM_X86_OP_OPTIONAL(vm_move_enc_context_from) 121KVM_X86_OP(get_msr_feature) 122KVM_X86_OP(can_emulate_instruction) 123KVM_X86_OP(apic_init_signal_blocked) 124KVM_X86_OP_OPTIONAL(enable_direct_tlbflush) 125KVM_X86_OP_OPTIONAL(migrate_timers) 126KVM_X86_OP(msr_filter_changed) 127KVM_X86_OP(complete_emulated_msr) 128KVM_X86_OP(vcpu_deliver_sipi_vector) 129KVM_X86_OP_OPTIONAL_RET0(vcpu_get_apicv_inhibit_reasons); 130KVM_X86_OP_OPTIONAL(alloc_apic_backing_page) 131KVM_X86_OP_OPTIONAL(rmp_page_level_adjust) 132 133#undef KVM_X86_OP 134#undef KVM_X86_OP_OPTIONAL 135#undef KVM_X86_OP_OPTIONAL_RET0