lkml.org 
[lkml]   [2021]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 15/15] KVM: nVMX: Drop redundant checks on vmcs12 in EPTP switching emulation
From
Drop the explicit checks on EPTP switching and EPT itself being enabled.
The EPTP switching check is handled in the generic VMFUNC function check,
the underlying VMFUNC enablement check is done by hardware and redone
by generic VMFUNC emulation, and the vmcs12 EPT check is handled by KVM
at VM-Enter in the form of a consistency check.

Signed-off-by: Sean Christopherson <seanjc@google.com>
---
arch/x86/kvm/vmx/nested.c | 4 ----
1 file changed, 4 deletions(-)

diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c
index 0075d3f0f8fa..479ec9378609 100644
--- a/arch/x86/kvm/vmx/nested.c
+++ b/arch/x86/kvm/vmx/nested.c
@@ -5448,10 +5448,6 @@ static int nested_vmx_eptp_switching(struct kvm_vcpu *vcpu,
u32 index = kvm_rcx_read(vcpu);
u64 new_eptp;

- if (!nested_cpu_has_eptp_switching(vmcs12) ||
- !nested_cpu_has_ept(vmcs12))
- return 1;
-
if (index >= VMFUNC_EPTP_ENTRIES)
return 1;

--
2.32.0.rc1.229.g3e70b5a671-goog
\
 
 \ /
  Last update: 2021-06-10 01:45    [W:0.083 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site