From: Amit Shah Subject: [PATCH] KVM: Make unloading of FPU state when putting vcpu arch-independent Date: Sun, 18 Nov 2007 19:24:45 +0200 Message-ID: <1195406685648-git-send-email-amit.shah@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org, Amit Shah To: avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org 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. Signed-off-by: Amit Shah --- drivers/kvm/vmx.c | 1 - drivers/kvm/x86.c | 1 + 2 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index da3a339..16e3935 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -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) diff --git a/drivers/kvm/x86.c b/drivers/kvm/x86.c index e905d46..f48138b 100644 --- a/drivers/kvm/x86.c +++ b/drivers/kvm/x86.c @@ -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) -- 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/