Skip to contentSkip to conversation

fx_init() needs preemption disabled while it plays with the FPU state

PATCH In review Rusty Russell 2 participants 2 messages Jul 30, 2007 1 message not in the archive KVM

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fx_init() needs preemption disabled while it plays with the FPU state

fx_init() needs preemption disabled while it plays with the FPU state

drivers/kvm/kvm_main.c +3 -0
diff -r 66566cf6b576 drivers/kvm/kvm_main.c
@@ -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/

A message that is not in the archive (sent off-list or not yet received): 1185776996.12151.145.camel-bi+AKbBUZKY6gyzm1THtWbp2dZbC/[email protected]

#2 lore raw
Quoted 4 lines · Rusty Russell

fx_init() needs preemption disabled while it plays with the FPU state

Yes, fallout from enabling preemption. Applied & thanks.

Signature · 8 lines
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/