ia64/xen-unstable

changeset 13242:f60c305186b4

[HVM] Add triple-fault handler (resets the domain).
Todo: How to hook this for SVM?
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Jan 03 10:01:32 2007 +0000 (2007-01-03)
parents 886f7312257e
children 968c9d322b88
files xen/arch/x86/hvm/hvm.c xen/arch/x86/hvm/vmx/vmx.c xen/include/asm-x86/hvm/support.h
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Tue Jan 02 14:19:47 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Wed Jan 03 10:01:32 2007 +0000
     1.3 @@ -269,6 +269,12 @@ void hvm_hlt(unsigned long rflags)
     1.4      do_sched_op_compat(SCHEDOP_block, 0);
     1.5  }
     1.6  
     1.7 +void hvm_triple_fault(void)
     1.8 +{
     1.9 +    gdprintk(XENLOG_INFO, "Triple fault - reset.\n");
    1.10 +    domain_shutdown(current->domain, SHUTDOWN_reboot);
    1.11 +}
    1.12 +
    1.13  /*
    1.14   * __hvm_copy():
    1.15   *  @buf  = hypervisor buffer
     2.1 --- a/xen/arch/x86/hvm/vmx/vmx.c	Tue Jan 02 14:19:47 2007 +0000
     2.2 +++ b/xen/arch/x86/hvm/vmx/vmx.c	Wed Jan 03 10:01:32 2007 +0000
     2.3 @@ -2404,7 +2404,8 @@ asmlinkage void vmx_vmexit_handler(struc
     2.4          vmx_do_extint(regs);
     2.5          break;
     2.6      case EXIT_REASON_TRIPLE_FAULT:
     2.7 -        goto exit_and_crash;
     2.8 +        hvm_triple_fault();
     2.9 +        break;
    2.10      case EXIT_REASON_PENDING_INTERRUPT:
    2.11          /* Disable the interrupt window. */
    2.12          v->arch.hvm_vcpu.u.vmx.exec_control &= ~CPU_BASED_VIRTUAL_INTR_PENDING;
     3.1 --- a/xen/include/asm-x86/hvm/support.h	Tue Jan 02 14:19:47 2007 +0000
     3.2 +++ b/xen/include/asm-x86/hvm/support.h	Wed Jan 03 10:01:32 2007 +0000
     3.3 @@ -134,5 +134,6 @@ void hlt_timer_fn(void *data);
     3.4  void hvm_do_hypercall(struct cpu_user_regs *pregs);
     3.5  
     3.6  void hvm_hlt(unsigned long rflags);
     3.7 +void hvm_triple_fault(void);
     3.8  
     3.9  #endif /* __ASM_X86_HVM_SUPPORT_H__ */