Skip to content
Snippets Groups Projects
Commit cc1b4680 authored by Davidlohr Bueso's avatar Davidlohr Bueso Committed by Paolo Bonzini
Browse files

kvm,lapic: Justify use of swait_active()


A comment might serve future readers.

Signed-off-by: default avatarDavidlohr Bueso <dbueso@suse.de>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent b9f67a42
No related branches found
No related tags found
No related merge requests found
......@@ -1324,6 +1324,10 @@ static void apic_timer_expired(struct kvm_lapic *apic)
atomic_inc(&apic->lapic_timer.pending);
kvm_set_pending_timer(vcpu);
/*
* For x86, the atomic_inc() is serialized, thus
* using swait_active() is safe.
*/
if (swait_active(q))
swake_up(q);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment