Skip to content

Commit

Permalink
KVM: Add a might_sleep() annotation to gfn_to_page()
Browse files Browse the repository at this point in the history
This will help trap accesses to guest memory in atomic context.

Signed-off-by: Avi Kivity <avi@qumranet.com>
  • Loading branch information
Avi Kivity committed Jan 30, 2008
1 parent e00c8cf commit 6039522
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,8 @@ struct page *gfn_to_page(struct kvm *kvm, gfn_t gfn)
struct page *page[1];
int npages;

might_sleep();

gfn = unalias_gfn(kvm, gfn);
slot = __gfn_to_memslot(kvm, gfn);
if (!slot) {
Expand Down

0 comments on commit 6039522

Please sign in to comment.