]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
KVM: VMX: Simplify vmx_get_nmi_mask()
authorAvi Kivity <avi@redhat.com>
Tue, 4 May 2010 09:24:12 +0000 (12:24 +0300)
committerAvi Kivity <avi@redhat.com>
Sun, 1 Aug 2010 07:35:27 +0000 (10:35 +0300)
!! is not needed due to the cast to bool.

Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/vmx.c

index ee03679efe788d61e73d76f818931d8c1a45fad2..64252075796a10bef959149cc77a2a7ae25067e2 100644 (file)
@@ -2826,9 +2826,7 @@ static bool vmx_get_nmi_mask(struct kvm_vcpu *vcpu)
 {
        if (!cpu_has_virtual_nmis())
                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)