|
@@ -786,14 +786,18 @@ enum {
|
|
* reboot turns off virtualization while processes are running.
|
|
* reboot turns off virtualization while processes are running.
|
|
* Trap the fault and ignore the instruction if that happens.
|
|
* Trap the fault and ignore the instruction if that happens.
|
|
*/
|
|
*/
|
|
-asmlinkage void kvm_handle_fault_on_reboot(void);
|
|
|
|
|
|
+asmlinkage void kvm_spurious_fault(void);
|
|
|
|
+extern bool kvm_rebooting;
|
|
|
|
|
|
#define __kvm_handle_fault_on_reboot(insn) \
|
|
#define __kvm_handle_fault_on_reboot(insn) \
|
|
"666: " insn "\n\t" \
|
|
"666: " insn "\n\t" \
|
|
|
|
+ "668: \n\t" \
|
|
".pushsection .fixup, \"ax\" \n" \
|
|
".pushsection .fixup, \"ax\" \n" \
|
|
"667: \n\t" \
|
|
"667: \n\t" \
|
|
|
|
+ "cmpb $0, kvm_rebooting \n\t" \
|
|
|
|
+ "jne 668b \n\t" \
|
|
__ASM_SIZE(push) " $666b \n\t" \
|
|
__ASM_SIZE(push) " $666b \n\t" \
|
|
- "jmp kvm_handle_fault_on_reboot \n\t" \
|
|
|
|
|
|
+ "call kvm_spurious_fault \n\t" \
|
|
".popsection \n\t" \
|
|
".popsection \n\t" \
|
|
".pushsection __ex_table, \"a\" \n\t" \
|
|
".pushsection __ex_table, \"a\" \n\t" \
|
|
_ASM_PTR " 666b, 667b \n\t" \
|
|
_ASM_PTR " 666b, 667b \n\t" \
|