Adding 'else' to reduce checking.
These two conditions are in conflict, adding 'else' to reduce checking. Signed-off-by: Haiwei Li <lihaiwei@tencent.com> Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com> Reviewed-by: Miaohe Lin <linmiaohe@huawei.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
b91991bf6b
commit
17ac43a894
|
@ -1571,9 +1571,9 @@ static void kvm_apic_inject_pending_timer_irqs(struct kvm_lapic *apic)
|
||||||
struct kvm_timer *ktimer = &apic->lapic_timer;
|
struct kvm_timer *ktimer = &apic->lapic_timer;
|
||||||
|
|
||||||
kvm_apic_local_deliver(apic, APIC_LVTT);
|
kvm_apic_local_deliver(apic, APIC_LVTT);
|
||||||
if (apic_lvtt_tscdeadline(apic))
|
if (apic_lvtt_tscdeadline(apic)) {
|
||||||
ktimer->tscdeadline = 0;
|
ktimer->tscdeadline = 0;
|
||||||
if (apic_lvtt_oneshot(apic)) {
|
} else if (apic_lvtt_oneshot(apic)) {
|
||||||
ktimer->tscdeadline = 0;
|
ktimer->tscdeadline = 0;
|
||||||
ktimer->target_expiration = 0;
|
ktimer->target_expiration = 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue