* [PATCH] fx_init() needs preemption disabled while it plays with the FPU state
@ 2007-07-30 6:29 Rusty Russell
[not found] ` <1185776996.12151.145.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Rusty Russell @ 2007-07-30 6:29 UTC (permalink / raw)
To: kvm-devel
fx_init() needs preemption disabled while it plays with the FPU state
Signed-off-by: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
diff -r 66566cf6b576 drivers/kvm/kvm_main.c
--- a/drivers/kvm/kvm_main.c Fri Jul 27 16:27:11 2007 +1000
+++ b/drivers/kvm/kvm_main.c Mon Jul 30 11:22:44 2007 +1000
@@ -651,10 +651,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;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] fx_init() needs preemption disabled while it plays with the FPU state
[not found] ` <1185776996.12151.145.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
@ 2007-07-30 8:40 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2007-07-30 8:40 UTC (permalink / raw)
To: Rusty Russell; +Cc: kvm-devel
Rusty Russell wrote:
> fx_init() needs preemption disabled while it plays with the FPU state
>
> Signed-off-by: Rusty Russell <rusty-8n+1lVoiYb80n/F98K4Iww@public.gmane.org>
>
Yes, fallout from enabling preemption. Applied & thanks.
--
error compiling committee.c: too many arguments to function
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-30 8:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-30 6:29 [PATCH] fx_init() needs preemption disabled while it plays with the FPU state Rusty Russell
[not found] ` <1185776996.12151.145.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2007-07-30 8:40 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox