[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [HVM] Add triple-fault handler (resets the domain).



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1167818492 0
# Node ID f60c305186b4de7159b4bda6f47df88c0a12ed58
# Parent  886f7312257ee398e6169f608c23d959840adc65
[HVM] Add triple-fault handler (resets the domain).
Todo: How to hook this for SVM?
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 xen/arch/x86/hvm/hvm.c            |    6 ++++++
 xen/arch/x86/hvm/vmx/vmx.c        |    3 ++-
 xen/include/asm-x86/hvm/support.h |    1 +
 3 files changed, 9 insertions(+), 1 deletion(-)

diff -r 886f7312257e -r f60c305186b4 xen/arch/x86/hvm/hvm.c
--- a/xen/arch/x86/hvm/hvm.c    Tue Jan 02 14:19:47 2007 +0000
+++ b/xen/arch/x86/hvm/hvm.c    Wed Jan 03 10:01:32 2007 +0000
@@ -267,6 +267,12 @@ void hvm_hlt(unsigned long rflags)
         return hvm_vcpu_down();
 
     do_sched_op_compat(SCHEDOP_block, 0);
+}
+
+void hvm_triple_fault(void)
+{
+    gdprintk(XENLOG_INFO, "Triple fault - reset.\n");
+    domain_shutdown(current->domain, SHUTDOWN_reboot);
 }
 
 /*
diff -r 886f7312257e -r f60c305186b4 xen/arch/x86/hvm/vmx/vmx.c
--- a/xen/arch/x86/hvm/vmx/vmx.c        Tue Jan 02 14:19:47 2007 +0000
+++ b/xen/arch/x86/hvm/vmx/vmx.c        Wed Jan 03 10:01:32 2007 +0000
@@ -2404,7 +2404,8 @@ asmlinkage void vmx_vmexit_handler(struc
         vmx_do_extint(regs);
         break;
     case EXIT_REASON_TRIPLE_FAULT:
-        goto exit_and_crash;
+        hvm_triple_fault();
+        break;
     case EXIT_REASON_PENDING_INTERRUPT:
         /* Disable the interrupt window. */
         v->arch.hvm_vcpu.u.vmx.exec_control &= ~CPU_BASED_VIRTUAL_INTR_PENDING;
diff -r 886f7312257e -r f60c305186b4 xen/include/asm-x86/hvm/support.h
--- a/xen/include/asm-x86/hvm/support.h Tue Jan 02 14:19:47 2007 +0000
+++ b/xen/include/asm-x86/hvm/support.h Wed Jan 03 10:01:32 2007 +0000
@@ -134,5 +134,6 @@ void hvm_do_hypercall(struct cpu_user_re
 void hvm_do_hypercall(struct cpu_user_regs *pregs);
 
 void hvm_hlt(unsigned long rflags);
+void hvm_triple_fault(void);
 
 #endif /* __ASM_X86_HVM_SUPPORT_H__ */

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.