Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9bd01506ee551689b90ba5822c28ef55207146af
Commit:     9bd01506ee551689b90ba5822c28ef55207146af
Parent:     11ec2804711896546ee3c945f3786c7f9fdd175a
Author:     Rusty Russell <[EMAIL PROTECTED]>
AuthorDate: Mon Jul 30 16:29:56 2007 +1000
Committer:  Avi Kivity <[EMAIL PROTECTED]>
CommitDate: Sat Oct 13 10:18:20 2007 +0200

    KVM: fx_init() needs preemption disabled while it plays with the FPU state
    
    Now that kvm generally runs with preemption enabled, we need to protect
    the fpu intialization sequence.
    
    Signed-off-by: Rusty Russell <[EMAIL PROTECTED]>
    Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>
---
 drivers/kvm/kvm_main.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c
index 7aeaaba..5b42731 100644
--- a/drivers/kvm/kvm_main.c
+++ b/drivers/kvm/kvm_main.c
@@ -693,10 +693,13 @@ void fx_init(struct kvm_vcpu *vcpu)
 
        } *fx_image;
 
+       /* Initialize guest FPU by resetting ours and saving into guest's */
+       preempt_disable();
        fx_save(vcpu->host_fx_image);
        fpu_init();
        fx_save(vcpu->guest_fx_image);
        fx_restore(vcpu->host_fx_image);
+       preempt_enable();
 
        fx_image = (struct fx_image_s *)vcpu->guest_fx_image;
        fx_image->mxcsr = 0x1f80;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to