diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-01-03 10:01:32 +0000 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-01-03 10:01:32 +0000 |
commit | 5c9548534eba8c441fdc577268e38387efa047ed (patch) | |
tree | c6adb1e5d124614cdc257f246ebb22fe33578e6c | |
parent | 3c4b2d4c00fd0dcb2d8044c6efa0ce46c234639a (diff) | |
download | xen-5c9548534eba8c441fdc577268e38387efa047ed.tar.gz xen-5c9548534eba8c441fdc577268e38387efa047ed.tar.bz2 xen-5c9548534eba8c441fdc577268e38387efa047ed.zip |
[HVM] Add triple-fault handler (resets the domain).
Todo: How to hook this for SVM?
Signed-off-by: Keir Fraser <keir@xensource.com>
-rw-r--r-- | xen/arch/x86/hvm/hvm.c | 6 | ||||
-rw-r--r-- | xen/arch/x86/hvm/vmx/vmx.c | 3 | ||||
-rw-r--r-- | xen/include/asm-x86/hvm/support.h | 1 |
3 files changed, 9 insertions, 1 deletions
diff --git a/xen/arch/x86/hvm/hvm.c b/xen/arch/x86/hvm/hvm.c index ec045ad389..119b3bd625 100644 --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -269,6 +269,12 @@ void hvm_hlt(unsigned long rflags) 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); +} + /* * __hvm_copy(): * @buf = hypervisor buffer diff --git a/xen/arch/x86/hvm/vmx/vmx.c b/xen/arch/x86/hvm/vmx/vmx.c index 36abbd290b..473b2eee06 100644 --- a/xen/arch/x86/hvm/vmx/vmx.c +++ b/xen/arch/x86/hvm/vmx/vmx.c @@ -2404,7 +2404,8 @@ asmlinkage void vmx_vmexit_handler(struct cpu_user_regs *regs) 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 --git a/xen/include/asm-x86/hvm/support.h b/xen/include/asm-x86/hvm/support.h index 3f3ff94386..721492412a 100644 --- a/xen/include/asm-x86/hvm/support.h +++ b/xen/include/asm-x86/hvm/support.h @@ -134,5 +134,6 @@ void hlt_timer_fn(void *data); 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__ */ |