lkml.org 
[lkml]   [2022]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.15 262/262] KVM: x86/mmu: Passing up the error state of mmu_alloc_shadow_roots()
    Date
    From: Like Xu <likexu@tencent.com>

    commit c6c937d673aaa1d603f62f134e1ca9c173eeeed3 upstream.

    Just like on the optional mmu_alloc_direct_roots() path, once shadow
    path reaches "r = -EIO" somewhere, the caller needs to know the actual
    state in order to enter error handling and avoid something worse.

    Fixes: 4a38162ee9f1 ("KVM: MMU: load PDPTRs outside mmu_lock")
    Signed-off-by: Like Xu <likexu@tencent.com>
    Reviewed-by: Sean Christopherson <seanjc@google.com>
    Message-Id: <20220301124941.48412-1-likexu@tencent.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ---
    arch/x86/kvm/mmu/mmu.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/arch/x86/kvm/mmu/mmu.c
    +++ b/arch/x86/kvm/mmu/mmu.c
    @@ -3579,7 +3579,7 @@ set_root_pgd:
    out_unlock:
    write_unlock(&vcpu->kvm->mmu_lock);

    - return 0;
    + return r;
    }

    static int mmu_alloc_special_roots(struct kvm_vcpu *vcpu)

    \
     
     \ /
      Last update: 2022-03-07 11:24    [W:27.646 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site