aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/vmx.c
diff options
context:
space:
mode:
authorAvi Kivity <avi@redhat.com>2010-05-04 05:24:12 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 03:35:27 -0400
commitc332c83ae736c72dcf072e96e98a774fce39e722 (patch)
treef06830d88cbb3392c473c99871cc54a436f956a5 /arch/x86/kvm/vmx.c
parentbf998156d24bcb127318ad5bf531ac3bdfcd6449 (diff)
KVM: VMX: Simplify vmx_get_nmi_mask()
!! is not needed due to the cast to bool. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/vmx.c')
-rw-r--r--arch/x86/kvm/vmx.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index ee03679efe78..64252075796a 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2826,9 +2826,7 @@ static bool vmx_get_nmi_mask(struct kvm_vcpu *vcpu)
2826{ 2826{
2827 if (!cpu_has_virtual_nmis()) 2827 if (!cpu_has_virtual_nmis())
2828 return to_vmx(vcpu)->soft_vnmi_blocked; 2828 return to_vmx(vcpu)->soft_vnmi_blocked;
2829 else 2829 return vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) & GUEST_INTR_STATE_NMI;
2830 return !!(vmcs_read32(GUEST_INTERRUPTIBILITY_INFO) &
2831 GUEST_INTR_STATE_NMI);
2832} 2830}
2833 2831
2834static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked) 2832static void vmx_set_nmi_mask(struct kvm_vcpu *vcpu, bool masked)