hv: nested: redundant permission check on nested_vmentry()

check_vmx_permission() is called in vmresume_vmexit_handler() and
vmlaunch_vmexit_handler() already.

Tracked-On: #6289
Signed-off-by: Zide Chen <zide.chen@intel.com>
This commit is contained in:
Zide Chen 2021-08-18 22:40:16 -07:00 committed by wenlingz
parent d575edf79a
commit ad37553873

View File

@ -1409,7 +1409,6 @@ static void nested_vmentry(struct acrn_vcpu *vcpu, bool is_launch)
{
struct acrn_vmcs12 *vmcs12 = &vcpu->arch.nested.vmcs12;
if (check_vmx_permission(vcpu)) {
if (vcpu->arch.nested.current_vmcs12_ptr == INVALID_GPA) {
nested_vmx_result(VMfailInvalid, 0);
} else if (is_launch && (vmcs12->launch_state != VMCS12_LAUNCH_STATE_CLEAR)) {
@ -1456,7 +1455,6 @@ static void nested_vmentry(struct acrn_vcpu *vcpu, bool is_launch)
vcpu->launched = false;
}
}
}
/*
* @pre vcpu != NULL