ia64/xen-unstable

changeset 13243:968c9d322b88

[HVM][SVM] Triple faulkts (shutdown state) causes domain reset.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Wed Jan 03 10:53:45 2007 +0000 (2007-01-03)
parents f60c305186b4
children 8268807adbed
files xen/arch/x86/hvm/hvm.c xen/arch/x86/hvm/svm/svm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Wed Jan 03 10:01:32 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Wed Jan 03 10:53:45 2007 +0000
     1.3 @@ -271,8 +271,10 @@ void hvm_hlt(unsigned long rflags)
     1.4  
     1.5  void hvm_triple_fault(void)
     1.6  {
     1.7 -    gdprintk(XENLOG_INFO, "Triple fault - reset.\n");
     1.8 -    domain_shutdown(current->domain, SHUTDOWN_reboot);
     1.9 +    struct vcpu *v = current;
    1.10 +    gdprintk(XENLOG_INFO, "Triple fault on VCPU%d - "
    1.11 +             "invoking HVM system reset.\n", v->vcpu_id);
    1.12 +    domain_shutdown(v->domain, SHUTDOWN_reboot);
    1.13  }
    1.14  
    1.15  /*
     2.1 --- a/xen/arch/x86/hvm/svm/svm.c	Wed Jan 03 10:01:32 2007 +0000
     2.2 +++ b/xen/arch/x86/hvm/svm/svm.c	Wed Jan 03 10:53:45 2007 +0000
     2.3 @@ -2701,23 +2701,14 @@ asmlinkage void svm_vmexit_handler(struc
     2.4      }
     2.5      break;
     2.6  
     2.7 +    case VMEXIT_INTR:
     2.8      case VMEXIT_NMI:
     2.9 -        break;
    2.10 -
    2.11      case VMEXIT_SMI:
    2.12 -        /*
    2.13 -         * For asynchronous SMI's, we just need to allow global interrupts 
    2.14 -         * so that the SMI is taken properly in the context of the host.  The
    2.15 -         * standard code does a STGI after the VMEXIT which should accomplish 
    2.16 -         * this task.  Continue as normal and restart the guest.
    2.17 -         */
    2.18 +        /* Asynchronous events, handled when we STGI'd after the VMEXIT. */
    2.19          break;
    2.20  
    2.21      case VMEXIT_INIT:
    2.22 -        /*
    2.23 -         * Nothing to do, in fact we should never get to this point. 
    2.24 -         */
    2.25 -        break;
    2.26 +        BUG(); /* unreachable */
    2.27  
    2.28      case VMEXIT_EXCEPTION_BP:
    2.29  #ifdef XEN_DEBUGGER
    2.30 @@ -2779,9 +2770,6 @@ asmlinkage void svm_vmexit_handler(struc
    2.31  	vmcb->general1_intercepts &= ~GENERAL1_INTERCEPT_VINTR;
    2.32  	break;
    2.33  
    2.34 -    case VMEXIT_INTR:
    2.35 -        break;
    2.36 -
    2.37      case VMEXIT_INVD:
    2.38          svm_vmexit_do_invd(vmcb);
    2.39          break;
    2.40 @@ -2867,8 +2855,8 @@ asmlinkage void svm_vmexit_handler(struc
    2.41          break;
    2.42  
    2.43      case VMEXIT_SHUTDOWN:
    2.44 -        gdprintk(XENLOG_ERR, "Guest shutdown exit\n");
    2.45 -        goto exit_and_crash;
    2.46 +        hvm_triple_fault();
    2.47 +        break;
    2.48  
    2.49      default:
    2.50      exit_and_crash: