lkml.org 
[lkml]   [2017]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/6] KVM: nVMX: we support 1GB EPT pages
From
Date
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 <pbonzini@redhat.com>
> ---
> 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 <david@redhat.com>

--
Thanks,

David

\
 
 \ /
  Last update: 2017-03-09 11:35    [W:1.312 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site