diff options
author | Bandan Das <bsd@redhat.com> | 2016-07-12 18:18:52 -0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-07-14 09:03:50 +0200 |
commit | 02120c45b07953ca4dfc19fa6ff90466efaf363f (patch) | |
tree | c8064e0f9a57eb870512d5785ed0e161f418a6f6 /arch/x86/kvm | |
parent | d95c55687e11febe3ab1aacfe82b58b1822c52c4 (diff) | |
download | op-kernel-dev-02120c45b07953ca4dfc19fa6ff90466efaf363f.zip op-kernel-dev-02120c45b07953ca4dfc19fa6ff90466efaf363f.tar.gz |
kvm: vmx: advertise support for ept execute only
MMU now knows about execute only mappings, so
advertise the feature to L1 hypervisors
Signed-off-by: Bandan Das <bsd@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/vmx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index bd7d60f..729e5f6 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2794,6 +2794,9 @@ static void nested_vmx_setup_ctls_msrs(struct vcpu_vmx *vmx) 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; + 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; /* * For nested guests, we don't do anything specific |