mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-11 21:14:07 +08:00
KVM: Add a might_sleep() annotation to gfn_to_page()
This will help trap accesses to guest memory in atomic context. Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
parent
e00c8cf29b
commit
60395224d9
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user