From patchwork Tue Oct 20 12:37:20 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcelo Tosatti X-Patchwork-Id: 54938 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n9KCbbto005504 for ; Tue, 20 Oct 2009 12:37:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752021AbZJTMha (ORCPT ); Tue, 20 Oct 2009 08:37:30 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752020AbZJTMha (ORCPT ); Tue, 20 Oct 2009 08:37:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:5976 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752017AbZJTMha (ORCPT ); Tue, 20 Oct 2009 08:37:30 -0400 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 n9KCbYKG009062 for ; Tue, 20 Oct 2009 08:37:34 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n9KCbYn1005902; Tue, 20 Oct 2009 08:37:34 -0400 Received: from amt.cnet (vpn-10-93.str.redhat.com [10.32.10.93]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n9KCbWA3009323; Tue, 20 Oct 2009 08:37:33 -0400 Received: from amt.cnet (amt.cnet [127.0.0.1]) by amt.cnet (Postfix) with ESMTP id D7B37274DD8; Tue, 20 Oct 2009 10:37:26 -0200 (BRST) Received: (from marcelo@localhost) by amt.cnet (8.14.3/8.14.3/Submit) id n9KCbKm4005688; Tue, 20 Oct 2009 10:37:20 -0200 Date: Tue, 20 Oct 2009 10:37:20 -0200 From: Marcelo Tosatti To: Avi Kivity Cc: kvm Subject: KVM: VMX: remove GUEST_CR3 write from vmx_vcpu_run Message-ID: <20091020123720.GA5679@amt.cnet> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.19 (2009-01-05) 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/vmx.c b/arch/x86/kvm/vmx.c index 364263a..325075f 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -3638,10 +3638,9 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu) { struct vcpu_vmx *vmx = to_vmx(vcpu); - if (enable_ept && is_paging(vcpu)) { - vmcs_writel(GUEST_CR3, vcpu->arch.cr3); + if (enable_ept && is_paging(vcpu)) ept_load_pdptrs(vcpu); - } + /* Record the guest's net vcpu time for enforced NMI injections. */ if (unlikely(!cpu_has_virtual_nmis() && vmx->soft_vnmi_blocked)) vmx->entry_time = ktime_get();