From patchwork Mon Dec 7 10:47:12 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Avi Kivity X-Patchwork-Id: 65492 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 nB7AlQ1D030203 for ; Mon, 7 Dec 2009 10:47:26 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752904AbZLGKrN (ORCPT ); Mon, 7 Dec 2009 05:47:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753394AbZLGKrL (ORCPT ); Mon, 7 Dec 2009 05:47:11 -0500 Received: from mx1.redhat.com ([209.132.183.28]:12529 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752880AbZLGKrI (ORCPT ); Mon, 7 Dec 2009 05:47:08 -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 nB7AlEHZ029876 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 7 Dec 2009 05:47:14 -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 nB7AlDvP018652; Mon, 7 Dec 2009 05:47:14 -0500 Received: from localhost.localdomain (file.tlv.redhat.com [10.35.255.8]) by cleopatra.tlv.redhat.com (Postfix) with ESMTP id 1DF06250051; Mon, 7 Dec 2009 12:47:13 +0200 (IST) From: Avi Kivity To: Marcelo Tosatti , Sheng Yang Cc: kvm@vger.kernel.org Subject: [PATCH 4/4] KVM: VMX: When using ept, allow the guest to own cr4.pge Date: Mon, 7 Dec 2009 12:47:12 +0200 Message-Id: <1260182832-3974-5-git-send-email-avi@redhat.com> In-Reply-To: <1260182832-3974-1-git-send-email-avi@redhat.com> References: <1260182832-3974-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/vmx.c b/arch/x86/kvm/vmx.c index d34fdd3..2e47e65 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2421,6 +2421,8 @@ static int vmx_vcpu_setup(struct vcpu_vmx *vmx) vmcs_writel(CR0_GUEST_HOST_MASK, ~0UL); vmx->vcpu.arch.cr4_guest_owned_bits = KVM_CR4_GUEST_OWNED_BITS; + if (enable_ept) + vmx->vcpu.arch.cr4_guest_owned_bits |= X86_CR4_PGE; vmcs_writel(CR4_GUEST_HOST_MASK, ~vmx->vcpu.arch.cr4_guest_owned_bits); tsc_base = vmx->vcpu.kvm->arch.vm_init_tsc;