lkml.org 
[lkml]   [2022]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.15 077/230] KVM: x86/mmu: Use yield-safe TDP MMU root iter in MMU notifier unmapping
    Date
    From: Sean Christopherson <seanjc@google.com>

    [ Upstream commit 7533377215b6ee432c06c5855f6be5d66e694e46 ]

    Use the yield-safe variant of the TDP MMU iterator when handling an
    unmapping event from the MMU notifier, as most occurences of the event
    allow yielding.

    Fixes: e1eed5847b09 ("KVM: x86/mmu: Allow yielding during MMU notifier unmap/zap, if possible")
    Cc: stable@vger.kernel.org
    Signed-off-by: Sean Christopherson <seanjc@google.com>
    Message-Id: <20211120015008.3780032-1-seanjc@google.com>
    Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    arch/x86/kvm/mmu/tdp_mmu.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c
    index 853780eb033b..6195f0d219ae 100644
    --- a/arch/x86/kvm/mmu/tdp_mmu.c
    +++ b/arch/x86/kvm/mmu/tdp_mmu.c
    @@ -1100,7 +1100,7 @@ bool kvm_tdp_mmu_unmap_gfn_range(struct kvm *kvm, struct kvm_gfn_range *range,
    {
    struct kvm_mmu_page *root;

    - for_each_tdp_mmu_root(kvm, root, range->slot->as_id)
    + for_each_tdp_mmu_root_yield_safe(kvm, root, range->slot->as_id, false)
    flush = zap_gfn_range(kvm, root, range->start, range->end,
    range->may_block, flush, false);

    --
    2.35.1


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