diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-07-23 08:22:45 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-07-23 08:22:45 +0200 |
commit | 41dbc6bcd9722bba8f09256655d060af30c63d34 (patch) | |
tree | 3de1f317633917da3fd57e98406eb73f42458dbc /arch/x86/kvm/lapic.c | |
parent | 3e5d2fdceda172554e681b68c853bf5d08205bbf (diff) | |
download | op-kernel-dev-41dbc6bcd9722bba8f09256655d060af30c63d34.zip op-kernel-dev-41dbc6bcd9722bba8f09256655d060af30c63d34.tar.gz |
KVM: x86: introduce kvm_check_has_quirk
The logic of the disabled_quirks field usually results in a double
negation. Wrap it in a simple function that checks the bit and
negates it.
Based on a patch from Xiao Guangrong.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.c')
-rw-r--r-- | arch/x86/kvm/lapic.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c index 954e98a..1c42544 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -1595,7 +1595,7 @@ void kvm_lapic_reset(struct kvm_vcpu *vcpu, bool init_event) for (i = 0; i < APIC_LVT_NUM; i++) apic_set_reg(apic, APIC_LVTT + 0x10 * i, APIC_LVT_MASKED); apic_update_lvtt(apic); - if (!(vcpu->kvm->arch.disabled_quirks & KVM_QUIRK_LINT0_REENABLED)) + if (kvm_check_has_quirk(vcpu->kvm, KVM_QUIRK_LINT0_REENABLED)) apic_set_reg(apic, APIC_LVT0, SET_APIC_DELIVERY_MODE(0, APIC_MODE_EXTINT)); apic_manage_nmi_watchdog(apic, kvm_apic_get_reg(apic, APIC_LVT0)); |