aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-x86/kvm_host.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-x86/kvm_host.h')
-rw-r--r--include/asm-x86/kvm_host.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h
index c2d066e185f4..0df9d5fa281a 100644
--- a/include/asm-x86/kvm_host.h
+++ b/include/asm-x86/kvm_host.h
@@ -692,4 +692,28 @@ enum {
692 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \ 692 trace_mark(kvm_trace_##name, "%u %p %u %u %u %u %u %u", KVM_TRC_##evt, \
693 vcpu, 0, 0, 0, 0, 0, 0) 693 vcpu, 0, 0, 0, 0, 0, 0)
694 694
695#ifdef CONFIG_64BIT
696#define KVM_EX_ENTRY ".quad"
697#else
698#define KVM_EX_ENTRY ".long"
699#endif
700
701/*
702 * Hardware virtualization extension instructions may fault if a
703 * reboot turns off virtualization while processes are running.
704 * Trap the fault and ignore the instruction if that happens.
705 */
706asmlinkage void kvm_handle_fault_on_reboot(void);
707
708#define __kvm_handle_fault_on_reboot(insn) \
709 "666: " insn "\n\t" \
710 ".pushsection .text.fixup, \"ax\" \n" \
711 "667: \n\t" \
712 "push $666b \n\t" \
713 "jmp kvm_handle_fault_on_reboot \n\t" \
714 ".popsection \n\t" \
715 ".pushsection __ex_table, \"a\" \n\t" \
716 KVM_EX_ENTRY " 666b, 667b \n\t" \
717 ".popsection"
718
695#endif 719#endif