Patch "KVM: x86/mmu: Use common TDP MMU zap helper for MMU notifier unmap hook" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    KVM: x86/mmu: Use common TDP MMU zap helper for MMU notifier unmap hook

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     kvm-x86-mmu-use-common-tdp-mmu-zap-helper-for-mmu-no.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0a25179387b96a566e3b371ef59279f1ea916809
Author: Sean Christopherson <seanjc@xxxxxxxxxx>
Date:   Wed Dec 15 01:15:54 2021 +0000

    KVM: x86/mmu: Use common TDP MMU zap helper for MMU notifier unmap hook
    
    [ Upstream commit 83b83a02073ec8d18c77a9bbe0881d710f7a9d32 ]
    
    Use the common TDP MMU zap helper when handling an MMU notifier unmap
    event, the two flows are semantically identical.  Consolidate the code in
    preparation for a future bug fix, as both kvm_tdp_mmu_unmap_gfn_range()
    and __kvm_tdp_mmu_zap_gfn_range() are guilty of not zapping SPTEs in
    invalid roots.
    
    No functional change intended.
    
    Cc: stable@xxxxxxxxxxxxxxx
    Signed-off-by: Sean Christopherson <seanjc@xxxxxxxxxx>
    Message-Id: <20211215011557.399940-2-seanjc@xxxxxxxxxx>
    Signed-off-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/arch/x86/kvm/mmu/tdp_mmu.c b/arch/x86/kvm/mmu/tdp_mmu.c
index 6195f0d219ae..6c2bb60ccd88 100644
--- a/arch/x86/kvm/mmu/tdp_mmu.c
+++ b/arch/x86/kvm/mmu/tdp_mmu.c
@@ -1098,13 +1098,8 @@ int kvm_tdp_mmu_map(struct kvm_vcpu *vcpu, gpa_t gpa, u32 error_code,
 bool kvm_tdp_mmu_unmap_gfn_range(struct kvm *kvm, struct kvm_gfn_range *range,
 				 bool flush)
 {
-	struct kvm_mmu_page *root;
-
-	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);
-
-	return flush;
+	return __kvm_tdp_mmu_zap_gfn_range(kvm, range->slot->as_id, range->start,
+					   range->end, range->may_block, flush);
 }
 
 typedef bool (*tdp_handler_t)(struct kvm *kvm, struct tdp_iter *iter,



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux