]> xenbits.xensource.com Git - xen.git/commitdiff
x86, hvm: set vcpu->is_initialised after restore/migration
authorKeir Fraser <keir.fraser@citrix.com>
Tue, 16 Jun 2009 12:39:00 +0000 (13:39 +0100)
committerKeir Fraser <keir.fraser@citrix.com>
Tue, 16 Jun 2009 12:39:00 +0000 (13:39 +0100)
After restore/migration, the xenctx command for auxiliary vcpus
fails with a message "xc_vcpu_getcontext: No data available".

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
xen/arch/x86/hvm/hvm.c

index 561e30d15b3c20ea194d191fb4f1f8821e729600..fcf8d43ff9cb64453af02d59001ed86658a46cce 100644 (file)
@@ -662,8 +662,9 @@ static int hvm_load_cpu_ctxt(struct domain *d, hvm_domain_context_t *h)
     v->fpu_initialised = 1;
 
     /* Auxiliary processors should be woken immediately. */
-    if ( test_and_clear_bit(_VPF_down, &v->pause_flags) )
-        vcpu_wake(v);
+    v->is_initialised = 1;
+    clear_bit(_VPF_down, &v->pause_flags);
+    vcpu_wake(v);
 
     return 0;
 }