From patchwork Fri Feb 27 10:26:54 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 9130 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 n1RAScOe031500 for ; Fri, 27 Feb 2009 10:28:39 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756252AbZB0K1o (ORCPT ); Fri, 27 Feb 2009 05:27:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757889AbZB0K1n (ORCPT ); Fri, 27 Feb 2009 05:27:43 -0500 Received: from mx2.redhat.com ([66.187.237.31]:53593 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756252AbZB0K1L (ORCPT ); Fri, 27 Feb 2009 05:27:11 -0500 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 n1RARA6j024597; Fri, 27 Feb 2009 05:27:10 -0500 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 n1RAR9GS007075; Fri, 27 Feb 2009 05:27:09 -0500 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 n1RAR88s016426; Fri, 27 Feb 2009 05:27:08 -0500 Received: from localhost.localdomain (cleopatra.tlv.redhat.com [10.35.255.11]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 12706A0172; Fri, 27 Feb 2009 12:27:03 +0200 (IST) From: Avi Kivity To: kvm@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 31/37] KVM: MMU: Only enable cr4_pge role in shadow mode Date: Fri, 27 Feb 2009 12:26:54 +0200 Message-Id: <1235730420-7929-32-git-send-email-avi@redhat.com> In-Reply-To: <1235730420-7929-1-git-send-email-avi@redhat.com> References: <1235730420-7929-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 Two dimensional paging is only confused by it. Signed-off-by: Avi Kivity --- arch/x86/kvm/x86.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 6fbc346..19ccde6 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -364,7 +364,7 @@ void kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4) } kvm_x86_ops->set_cr4(vcpu, cr4); vcpu->arch.cr4 = cr4; - vcpu->arch.mmu.base_role.cr4_pge = !!(cr4 & X86_CR4_PGE); + vcpu->arch.mmu.base_role.cr4_pge = (cr4 & X86_CR4_PGE) && !tdp_enabled; kvm_mmu_sync_global(vcpu); kvm_mmu_reset_context(vcpu); }