OSDN Git Service

KVM: nVMX: remove useless is_protmode check
authorPaolo Bonzini <pbonzini@redhat.com>
Wed, 30 Jan 2019 16:25:38 +0000 (17:25 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 20 Feb 2019 21:48:24 +0000 (22:48 +0100)
VMX is only accessible in protected mode, remove a confusing check
that causes the conditional to lack a final "else" branch.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx/nested.c

index 0050c17..be9b2c8 100644 (file)
@@ -4056,7 +4056,7 @@ int get_vmx_mem_address(struct kvm_vcpu *vcpu, unsigned long exit_qualification,
                 * destination for long mode!
                 */
                exn = is_noncanonical_address(*ret, vcpu);
-       } else if (is_protmode(vcpu)) {
+       } else {
                /*
                 * When not in long mode, the virtual/linear address is
                 * unconditionally truncated to 32 bits regardless of the