From patchwork Sun Jan 10 10:31:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 71992 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 o0AAVkls001522 for ; Sun, 10 Jan 2010 10:31:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753322Ab0AJKbo (ORCPT ); Sun, 10 Jan 2010 05:31:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753294Ab0AJKbh (ORCPT ); Sun, 10 Jan 2010 05:31:37 -0500 Received: from mx1.redhat.com ([209.132.183.28]:20824 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753254Ab0AJKbd (ORCPT ); Sun, 10 Jan 2010 05:31:33 -0500 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o0AAVV9k010656 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 10 Jan 2010 05:31:31 -0500 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o0AAVUdQ012333; Sun, 10 Jan 2010 05:31:31 -0500 Received: from localhost.localdomain (file.tlv.redhat.com [10.35.255.8]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 6D07B250052; Sun, 10 Jan 2010 12:31:30 +0200 (IST) From: Avi Kivity To: Marcelo Tosatti , Joerg Roedel Cc: kvm@vger.kernel.org Subject: [PATCH 3/6] KVM: SVM: Initialize fpu_active in init_vmcb() Date: Sun, 10 Jan 2010 12:31:26 +0200 Message-Id: <1263119489-29150-4-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.11 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 4ad8e2e..92f5574 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c @@ -540,6 +540,8 @@ static void init_vmcb(struct vcpu_svm *svm) struct vmcb_control_area *control = &svm->vmcb->control; struct vmcb_save_area *save = &svm->vmcb->save; + svm->vcpu.fpu_active = 1; + control->intercept_cr_read = INTERCEPT_CR0_MASK | INTERCEPT_CR3_MASK | INTERCEPT_CR4_MASK; @@ -730,7 +732,6 @@ static struct kvm_vcpu *svm_create_vcpu(struct kvm *kvm, unsigned int id) init_vmcb(svm); fx_init(&svm->vcpu); - svm->vcpu.fpu_active = 1; svm->vcpu.arch.apic_base = 0xfee00000 | MSR_IA32_APICBASE_ENABLE; if (kvm_vcpu_is_bsp(&svm->vcpu)) svm->vcpu.arch.apic_base |= MSR_IA32_APICBASE_BSP;