[RHEL7,COMMIT] kvm: vmx: advertise support for ept execute only

Submitted by Konstantin Khorenko on May 16, 2018, 9:50 a.m.


Message ID 201805160950.w4G9oh0W029655@finist_ce7.work
State New
Series "kvm: vmx: advertise support for ept execute only"
Headers show

Commit Message

Konstantin Khorenko May 16, 2018, 9:50 a.m.
The commit is pushed to "branch-rh7-3.10.0-693.21.1.vz7.50.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-693.21.1.vz7.47.6
commit 654bdd1e7717e1a59af1a1c8526c35e210fc0e4c
Author: Bandan Das <bsd@redhat.com>
Date:   Wed May 16 12:50:43 2018 +0300

    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>
    (cherry picked from commit 02120c45b07953ca4dfc19fa6ff90466efaf363f)
    Signed-off-by: Jan Dakinevich <jan.dakinevich@virtuozzo.com>
    Patchset description:
    EPT fixes and enhancements
    Backport of EPT fixes from upstream for
    Bandan Das (3):
      kvm: mmu: don't set the present bit unconditionally
      kvm: mmu: track read permission explicitly for shadow EPT page tables
      kvm: vmx: advertise support for ept execute only
    Junaid Shahid (2):
      kvm: x86: mmu: Use symbolic constants for EPT Violation Exit
      kvm: x86: mmu: Rename EPT_VIOLATION_READ/WRITE/INSTR constants
    KarimAllah Ahmed (2):
      kvm: Map PFN-type memory regions as writable (if possible)
      KVM: x86: Update the exit_qualification access bits while walking an
    Paolo Bonzini (5):
      KVM: nVMX: we support 1GB EPT pages
      kvm: x86: MMU support for EPT accessed/dirty bits
      kvm: nVMX: support EPT accessed/dirty bits
      KVM: MMU: return page fault error code from permission_fault
      KVM: nVMX: fix EPT permissions as reported in exit qualification
 arch/x86/kvm/vmx.c | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 8d07bd9b6a92..300293804b91 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2656,6 +2656,9 @@  static void nested_vmx_setup_ctls_msrs(struct vcpu_vmx *vmx)
 		vmx->nested.nested_vmx_ept_caps = VMX_EPT_PAGE_WALK_4_BIT |
+		if (cpu_has_vmx_ept_execute_only())
+			vmx->nested.nested_vmx_ept_caps |=
 		vmx->nested.nested_vmx_ept_caps &= vmx_capability.ept;
 		vmx->nested.nested_vmx_ept_caps |= VMX_EPT_EXTENT_GLOBAL_BIT |