Browse Source

KVM: VMX: Simplify vmx_get_nmi_mask()

!! is not needed due to the cast to bool.

Signed-off-by: Avi Kivity <avi@redhat.com>
Avi Kivity 15 years ago
parent
commit
c332c83ae7
1 changed files with 1 additions and 3 deletions
  1. 1 3
      arch/x86/kvm/vmx.c

+ 1 - 3
arch/x86/kvm/vmx.c

@@ -2826,9 +2826,7 @@ static bool vmx_get_nmi_mask(struct kvm_vcpu *vcpu)
 {
 {
 	if (!cpu_has_virtual_nmis())
 	if (!cpu_has_virtual_nmis())
 		return to_vmx(vcpu)->soft_vnmi_blocked;
 		return to_vmx(vcpu)->soft_vnmi_blocked;
-	else
-		return !!(vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) &
-			  GUEST_INTR_STATE_NMI);
+	return vmcs_read32(GUEST_INTERRUPTIBILITY_INFO)	& GUEST_INTR_STATE_NMI;
 }
 }
 
 
 static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked)
 static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked)