When async_pf is ready the guest needs to be made aware of it ASAP, because it may be holding off a higher priority task pending the async_pf resolution in favor of a lower priority one. In case async_pf's are harvested in vcpu context (x86) we have to not only wake the vcpu up but kick it into host. While at this, also replace the open-coded vcpu wakeup by the existing helper. Signed-off-by: Roman Kagan <rkagan@xxxxxxxxxxxxx> --- virt/kvm/async_pf.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/virt/kvm/async_pf.c b/virt/kvm/async_pf.c index 9cced14..5f0a66c 100644 --- a/virt/kvm/async_pf.c +++ b/virt/kvm/async_pf.c @@ -105,8 +105,11 @@ static void async_pf_execute(struct work_struct *work) * This memory barrier pairs with prepare_to_wait's set_current_state() */ smp_mb(); - if (swait_active(&vcpu->wq)) - swake_up(&vcpu->wq); +#ifdef CONFIG_KVM_ASYNC_PF_SYNC + kvm_vcpu_wake_up(vcpu); +#else + kvm_vcpu_kick(vcpu); +#endif mmput(mm); kvm_put_kvm(vcpu->kvm); -- 2.9.3 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html