]> xenbits.xensource.com Git - people/iwj/xen.git/commitdiff
x86/HVM: attempts to emulate FPU insns need to set fpu_initialised
authorJan Beulich <jbeulich@suse.com>
Tue, 26 Jun 2018 06:41:08 +0000 (08:41 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 26 Jun 2018 06:41:08 +0000 (08:41 +0200)
My original way of thinking here was that this would be set anyway at
the point state gets reloaded after the adjustments hvmemul_put_fpu()
does, but the flag should already be set before that - after all the
guest may never again touch the FPU before e.g. getting migrated/saved.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Paul Durrant <paul.durrant@citrix.com>
xen/arch/x86/hvm/emulate.c

index 03a4944e880c6e6643246f26598c76cc56e107d5..7ecee12ffc353c1767de11c9affe723ecbce8e6c 100644 (file)
@@ -2053,6 +2053,7 @@ static int hvmemul_get_fpu(
          * masking of all exceptions by FNSTENV.)
          */
         save_fpu_enable();
+        curr->fpu_initialised = true;
         curr->fpu_dirtied = true;
         if ( (fpu_ctxt->fcw & 0x3f) != 0x3f )
         {