mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
KVM: Add PV MSR to enable asynchronous page faults delivery.
Guest enables async PF vcpu functionality using this MSR. Reviewed-by: Rik van Riel <[email protected]> Signed-off-by: Gleb Natapov <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
This commit is contained in:
parent
ca3f10172e
commit
344d9588a9
8 changed files with 101 additions and 3 deletions
|
|
@ -190,3 +190,23 @@ retry_sync:
|
|||
kmem_cache_free(async_pf_cache, work);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int kvm_async_pf_wakeup_all(struct kvm_vcpu *vcpu)
|
||||
{
|
||||
struct kvm_async_pf *work;
|
||||
|
||||
if (!list_empty(&vcpu->async_pf.done))
|
||||
return 0;
|
||||
|
||||
work = kmem_cache_zalloc(async_pf_cache, GFP_ATOMIC);
|
||||
if (!work)
|
||||
return -ENOMEM;
|
||||
|
||||
work->page = bad_page;
|
||||
get_page(bad_page);
|
||||
INIT_LIST_HEAD(&work->queue); /* for list_del to work */
|
||||
|
||||
list_add_tail(&work->link, &vcpu->async_pf.done);
|
||||
vcpu->async_pf.queued++;
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue