File 19765-hvm-post-restore-vcpu-state.patch of Package xen
# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1245155940 -3600
# Node ID f2a3b71889068551ec42f1d3fe362cfab202fb40
# Parent 775afcdc2759082e56ac22918c1f51a84917d160
x86, hvm: set vcpu->is_initialised after restore/migration
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>
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -649,8 +649,9 @@ static int hvm_load_cpu_ctxt(struct doma
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;
}