direct-io.hg

changeset 13604:d6d27c649fd6

[HVM] Wake up APs immediately during restore.
From: Edwin Zhai <edwin.zhai@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Jan 25 12:28:47 2007 +0000 (2007-01-25)
parents 42aaf08dd20e
children a9165141e52d
files xen/arch/x86/hvm/hvm.c
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Thu Jan 25 12:24:43 2007 +0000
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Thu Jan 25 12:28:47 2007 +0000
     1.3 @@ -170,12 +170,26 @@ void hvm_domain_destroy(struct domain *d
     1.4          unmap_domain_page_global((void *)d->arch.hvm_domain.buffered_io_va);
     1.5  }
     1.6  
     1.7 +int hvm_load_cpu_ctxt(hvm_domain_context_t *h, void *opaque, int version)
     1.8 +{
     1.9 +    struct vcpu *v = opaque;
    1.10 +
    1.11 +    if ( hvm_funcs.load_cpu_ctxt(h, opaque, version) < 0 )
    1.12 +        return -EINVAL;
    1.13 +
    1.14 +    /* Auxiliary processors shoudl be woken immediately. */
    1.15 +    if ( test_and_clear_bit(_VCPUF_down, &v->vcpu_flags) )
    1.16 +        vcpu_wake(v);
    1.17 +
    1.18 +    return 0;
    1.19 +}
    1.20 +
    1.21  int hvm_vcpu_initialise(struct vcpu *v)
    1.22  {
    1.23      int rc;
    1.24  
    1.25      hvm_register_savevm(v->domain, "xen_hvm_cpu", v->vcpu_id, 1,
    1.26 -                        hvm_funcs.save_cpu_ctxt, hvm_funcs.load_cpu_ctxt, 
    1.27 +                        hvm_funcs.save_cpu_ctxt, hvm_load_cpu_ctxt, 
    1.28                          (void *)v);
    1.29  
    1.30      if ( (rc = vlapic_init(v)) != 0 )