From patchwork Mon May 25 08:47:23 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 25785 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 n4P8lW3V022745 for ; Mon, 25 May 2009 08:47:33 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752017AbZEYIr2 (ORCPT ); Mon, 25 May 2009 04:47:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752558AbZEYIr2 (ORCPT ); Mon, 25 May 2009 04:47:28 -0400 Received: from mx2.redhat.com ([66.187.237.31]:53462 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752017AbZEYIrZ (ORCPT ); Mon, 25 May 2009 04:47:25 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4P8lRw1026079 for ; Mon, 25 May 2009 04:47:27 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4P8lQRI016313; Mon, 25 May 2009 04:47:27 -0400 Received: from cleopatra.tlv.redhat.com (cleopatra.tlv.redhat.com [10.35.255.11]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4P8lPim030306; Mon, 25 May 2009 04:47:26 -0400 Received: from localhost.localdomain (cleopatra.tlv.redhat.com [10.35.255.11]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 37F12250AC0; Mon, 25 May 2009 11:47:25 +0300 (IDT) From: Avi Kivity To: kvm@vger.kernel.org Cc: Marcelo Tosatti Subject: [PATCH 1/2] KVM: Make paravirt tlb flush also reload PAE PDPTEs Date: Mon, 25 May 2009 11:47:23 +0300 Message-Id: <1243241244-25953-2-git-send-email-avi@redhat.com> In-Reply-To: <1243241244-25953-1-git-send-email-avi@redhat.com> References: <1243241244-25953-1-git-send-email-avi@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The paravirt tlb flush may be used not only to flush TLBs, but also to reload the four page-directory-pointer-table entries, as it is used as a replacement for reloading CR3. Change the code to do the entire CR3 reloading dance instead of simply flushing the TLB. Signed-off-by: Avi Kivity --- arch/x86/kvm/mmu.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 6880a4c..7030b5f 100644 --- a/arch/x86/kvm/mmu.c +++ b/arch/x86/kvm/mmu.c @@ -2927,8 +2927,7 @@ static int kvm_pv_mmu_write(struct kvm_vcpu *vcpu, static int kvm_pv_mmu_flush_tlb(struct kvm_vcpu *vcpu) { - kvm_x86_ops->tlb_flush(vcpu); - set_bit(KVM_REQ_MMU_SYNC, &vcpu->requests); + kvm_set_cr3(vcpu, vcpu->arch.cr3); return 1; }