From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754341AbdCIKej (ORCPT ); Thu, 9 Mar 2017 05:34:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57574 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752763AbdCIKeh (ORCPT ); Thu, 9 Mar 2017 05:34:37 -0500 Subject: Re: [PATCH 1/6] KVM: nVMX: we support 1GB EPT pages To: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org References: <1488996236-5676-1-git-send-email-pbonzini@redhat.com> <1488996236-5676-2-git-send-email-pbonzini@redhat.com> Cc: bdas@redhat.com, dmatlack@google.com From: David Hildenbrand Organization: Red Hat GmbH Message-ID: <9093c21b-183c-f47f-aee6-985d4be32e26@redhat.com> Date: Thu, 9 Mar 2017 11:34:34 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <1488996236-5676-2-git-send-email-pbonzini@redhat.com> Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Thu, 09 Mar 2017 10:34:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am 08.03.2017 um 19:03 schrieb Paolo Bonzini: > Large pages at the PDPE level can be emulated by the MMU, so the bit > can be set unconditionally in the EPT capabilities MSR. The same is > true of 2MB EPT pages, though all Intel processors with EPT in practice > support those. > > Signed-off-by: Paolo Bonzini > --- > arch/x86/kvm/vmx.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c > index 283aa8601833..89b74d9bc357 100644 > --- a/arch/x86/kvm/vmx.c > +++ b/arch/x86/kvm/vmx.c > @@ -2764,14 +2764,14 @@ static void nested_vmx_setup_ctls_msrs(struct vcpu_vmx *vmx) > vmx->nested.nested_vmx_secondary_ctls_high |= > SECONDARY_EXEC_ENABLE_EPT; > vmx->nested.nested_vmx_ept_caps = VMX_EPT_PAGE_WALK_4_BIT | > - VMX_EPTP_WB_BIT | VMX_EPT_2MB_PAGE_BIT | > - VMX_EPT_INVEPT_BIT; > + VMX_EPTP_WB_BIT | VMX_EPT_INVEPT_BIT; > if (cpu_has_vmx_ept_execute_only()) > vmx->nested.nested_vmx_ept_caps |= > VMX_EPT_EXECUTE_ONLY_BIT; > vmx->nested.nested_vmx_ept_caps &= vmx_capability.ept; > vmx->nested.nested_vmx_ept_caps |= VMX_EPT_EXTENT_GLOBAL_BIT | > - VMX_EPT_EXTENT_CONTEXT_BIT; > + VMX_EPT_EXTENT_CONTEXT_BIT | VMX_EPT_2MB_PAGE_BIT | > + VMX_EPT_1GB_PAGE_BIT; > } else > vmx->nested.nested_vmx_ept_caps = 0; > > Reviewed-by: David Hildenbrand -- Thanks, David