diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2010-02-19 10:23:04 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2010-04-25 05:34:16 -0400 |
commit | 6c3bd3d7660c35a703073b81eccfd5a3b7c15295 (patch) | |
tree | 77e88f411dce1828dba9f834b58fc7f783374aa3 /arch/x86/kvm/svm.c | |
parent | cdbbdc1210223879450555fee04c29ebf116576b (diff) |
KVM: SVM: Annotate nested_svm_map with might_sleep()
The nested_svm_map() function can sleep and must not be
called from atomic context. So annotate that function.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r-- | arch/x86/kvm/svm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 02f8d491d15a..4bc018333d76 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -1434,6 +1434,8 @@ static void *nested_svm_map(struct vcpu_svm *svm, u64 gpa, struct page **_page) | |||
1434 | { | 1434 | { |
1435 | struct page *page; | 1435 | struct page *page; |
1436 | 1436 | ||
1437 | might_sleep(); | ||
1438 | |||
1437 | page = gfn_to_page(svm->vcpu.kvm, gpa >> PAGE_SHIFT); | 1439 | page = gfn_to_page(svm->vcpu.kvm, gpa >> PAGE_SHIFT); |
1438 | if (is_error_page(page)) | 1440 | if (is_error_page(page)) |
1439 | goto error; | 1441 | goto error; |