Skip to contentSkip to conversation

KVM: Make unloading of FPU state when putting vcpu arch-independent

PATCH Applied Amit Shah 2 participants 2 messages Nov 18, 2007 1 message not in the archive KVM

lore
Share & tools
lore

Amit Shah

author
#0 lore raw

PATCH 1/1 KVM: Make unloading of FPU state when putting vcpu arch-independent

Instead of having each architecture do it individually, we do this in the arch-independent code (just x86 as of now). Turns out SVM did not do this at all.

---
 drivers/kvm/vmx.c |    1 -
 drivers/kvm/x86.c |    1 +
 2 files changed, 1 insertions(+), 1 deletions(-)
drivers/kvm/vmx.c +0 -1
index da3a339..16e3935 100644
@@ -531,7 +531,6 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
 static void vmx_vcpu_put(struct kvm_vcpu *vcpu)
 {
 	vmx_load_host_state(to_vmx(vcpu));
-	kvm_put_guest_fpu(vcpu);
 }
 
 static void vmx_fpu_activate(struct kvm_vcpu *vcpu)
drivers/kvm/x86.c +1 -0
index e905d46..f48138b 100644
@@ -609,6 +609,7 @@ void kvm_arch_vcpu_load(struct kvm_vcpu *vcpu, int cpu)
 void kvm_arch_vcpu_put(struct kvm_vcpu *vcpu)
 {
 	kvm_x86_ops->vcpu_put(vcpu);
+	kvm_put_guest_fpu(vcpu);
 }
 
 static void cpuid_fix_nx_cap(struct kvm_vcpu *vcpu)
Signature · 7 lines
1.5.3


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Applied
#2 lore raw
In reply to a message not in the archive
Quoted 5 lines · Amit Shah

Instead of having each architecture do it individually, we do this in the arch-independent code (just x86 as of now). Turns out SVM did not do this at all.

Applied, thanks.

Signature · 7 lines
error compiling committee.c: too many arguments to function


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/