From: Avi Kivity Subject: [PATCH 6/6] KVM: SVM: Lazy fpu with npt Date: Sun, 10 Jan 2010 12:31:29 +0200 Message-ID: <1263119489-29150-7-git-send-email-avi@redhat.com> References: <1263119489-29150-1-git-send-email-avi@redhat.com> Cc: kvm@vger.kernel.org To: Marcelo Tosatti , Joerg Roedel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51003 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753261Ab0AJKbe (ORCPT ); Sun, 10 Jan 2010 05:31:34 -0500 In-Reply-To: <1263119489-29150-1-git-send-email-avi@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Now that we can allow the guest to play with cr0 when the fpu is loaded, we can enable lazy fpu when npt is in use. Signed-off-by: Avi Kivity --- arch/x86/kvm/svm.c | 8 -------- 1 files changed, 0 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index d969ad2..3ac48ee 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -2586,8 +2586,6 @@ static void svm_flush_tlb(struct kvm_vcpu *vcpu) static void svm_prepare_guest_switch(struct kvm_vcpu *vcpu) { - if (npt_enabled) - vcpu->fpu_active = 1; } static inline void sync_cr8_to_lapic(struct kvm_vcpu *vcpu) @@ -2926,12 +2924,6 @@ static void svm_fpu_deactivate(struct kvm_vcpu *vcpu) { struct vcpu_svm *svm = to_svm(vcpu); - if (npt_enabled) { - /* hack: npt requires active fpu at this time */ - vcpu->fpu_active = 1; - return; - } - update_cr0_intercept(svm); svm->vmcb->control.intercept_exceptions |= 1 << NM_VECTOR; } -- 1.6.5.3