From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bandan Das Subject: [RFC PATCH 4/4] vmx: advertise support for ept execute only Date: Mon, 20 Jun 2016 23:12:26 -0400 Message-ID: <1466478746-14153-5-git-send-email-bsd@redhat.com> References: <1466478746-14153-1-git-send-email-bsd@redhat.com> Cc: pbonzini@redhat.com, guangrong.xiao@linux.intel.com To: kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:40640 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753415AbcFUDPL (ORCPT ); Mon, 20 Jun 2016 23:15:11 -0400 In-Reply-To: <1466478746-14153-1-git-send-email-bsd@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: With the internal plumbing in place, advertise support to the L1 hypervisor Signed-off-by: Bandan Das --- arch/x86/kvm/vmx.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index dbfc000..5157ea5 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2717,6 +2717,8 @@ 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 -- 2.5.5