[xen stable-4.10] x86/HVM: attempts to emulate FPU insns need to set fpu_initialised

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[xen stable-4.10] x86/HVM: attempts to emulate FPU insns need to set fpu_initialised

patchbot
commit c2202404d376c10386952d2e42f647338af1ffa0
Author:     Jan Beulich <[hidden email]>
AuthorDate: Wed Jul 4 12:30:01 2018 +0200
Commit:     Jan Beulich <[hidden email]>
CommitDate: Wed Jul 4 12:30:01 2018 +0200

    x86/HVM: attempts to emulate FPU insns need to set fpu_initialised
   
    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 <[hidden email]>
    Reviewed-by: Andrew Cooper <[hidden email]>
    Acked-by: Paul Durrant <[hidden email]>
    master commit: 3310e3cd648f3713c824790bd71d8ec405a09d05
    master date: 2018-06-26 08:41:08 +0200
---
 xen/arch/x86/hvm/emulate.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
index 9a2ed5209d..a1f8b8369e 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -1900,6 +1900,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 )
         {
--
generated by git-patchbot for /home/xen/git/xen.git#stable-4.10

_______________________________________________
Xen-changelog mailing list
[hidden email]
https://lists.xenproject.org/xen-changelog