lkml.org 
[lkml]   [2010]   [Feb]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 05/11] KVM: SVM: Annotate nested_svm_map with might_sleep()
    Date
    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>
    ---
    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 c9d359a..4becefd 100644
    --- a/arch/x86/kvm/svm.c
    +++ b/arch/x86/kvm/svm.c
    @@ -1429,6 +1429,8 @@ static void *nested_svm_map(struct vcpu_svm *svm, u64 gpa, struct page **_page)
    {
    struct page *page;

    + might_sleep();
    +
    page = gfn_to_page(svm->vcpu.kvm, gpa >> PAGE_SHIFT);
    if (is_error_page(page))
    goto error;
    --
    1.6.6



    \
     
     \ /
      Last update: 2010-02-19 16:25    [W:4.230 / U:0.096 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site