Commit 60395224 authored by Avi Kivity's avatar Avi Kivity

KVM: Add a might_sleep() annotation to gfn_to_page()

This will help trap accesses to guest memory in atomic context.
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
parent e00c8cf2
...@@ -993,6 +993,8 @@ struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn) ...@@ -993,6 +993,8 @@ struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn)
struct page *page[1]; struct page *page[1];
int npages; int npages;
might_sleep();
gfn = unalias_gfn(kvm, gfn); gfn = unalias_gfn(kvm, gfn);
slot = __gfn_to_memslot(kvm, gfn); slot = __gfn_to_memslot(kvm, gfn);
if (!slot) { if (!slot) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment