From e0dfacbfe91ad7947f0c44829c0358ac2e17d3c6 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Wed, 30 Jan 2019 17:25:38 +0100 Subject: [PATCH] KVM: nVMX: remove useless is_protmode check 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 --- arch/x86/kvm/vmx/nested.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index 0050c179c5d3a..be9b2c8fd32ec 100644 --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c @@ -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 -- 2.39.5