# HG changeset patch # User Tim Deegan # Date 1180973352 -3600 # Node ID 7a16a499152ce67fb36b4e101b7d2d953d1f6362 # Parent 6f13c3be08fa4c044868144672783f7b1341999a [HVM] Save/restore: trigger FPU state save based on v->fpu_initialised and not on the i387_valid flag, which has no meaning in this context. Signed-off-by: Tim Deegan Index: xen-3.1-testing/xen/arch/x86/hvm/hvm.c =================================================================== --- xen-3.1-testing.orig/xen/arch/x86/hvm/hvm.c +++ xen-3.1-testing/xen/arch/x86/hvm/hvm.c @@ -272,7 +272,7 @@ static int hvm_save_cpu_ctxt(struct doma /* Other vcpu register state */ vc = &v->arch.guest_context; - if ( vc->flags & VGCF_i387_valid ) + if ( v->fpu_initialised ) memcpy(ctxt.fpu_regs, &vc->fpu_ctxt, sizeof(ctxt.fpu_regs)); else memset(ctxt.fpu_regs, 0, sizeof(ctxt.fpu_regs)); @@ -364,7 +364,7 @@ static int hvm_load_cpu_ctxt(struct doma vc->debugreg[6] = ctxt.dr6; vc->debugreg[7] = ctxt.dr7; - vc->flags = VGCF_i387_valid | VGCF_online; + vc->flags = VGCF_online; v->fpu_initialised = 1; /* Auxiliary processors should be woken immediately. */