From patchwork Sun Jan 10 10:31:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 71990 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.2) with ESMTP id o0AAVgl3001492 for ; Sun, 10 Jan 2010 10:31:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753319Ab0AJKbj (ORCPT ); Sun, 10 Jan 2010 05:31:39 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753260Ab0AJKbh (ORCPT ); Sun, 10 Jan 2010 05:31:37 -0500 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 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0AAVWUG028762 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 10 Jan 2010 05:31:33 -0500 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0AAVWXj005566; Sun, 10 Jan 2010 05:31:32 -0500 Received: from localhost.localdomain (file.tlv.redhat.com [10.35.255.8]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 7CAA9250055; Sun, 10 Jan 2010 12:31:30 +0200 (IST) From: Avi Kivity To: Marcelo Tosatti , Joerg Roedel Cc: kvm@vger.kernel.org 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> In-Reply-To: <1263119489-29150-1-git-send-email-avi@redhat.com> References: <1263119489-29150-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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; }