Patch "KVM: x86/mmu: Add lockdep when setting a TDP MMU SPTE" has been added to the 5.10-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: Add lockdep when setting a TDP MMU SPTE

to the 5.10-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-add-lockdep-when-setting-a-tdp-mmu-spte.patch
and it can be found in the queue-5.10 subdirectory.

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



commit a57a6d516fabcd0ae433d70baa868ba5615722bb
Author: Ben Gardon <bgardon@xxxxxxxxxx>
Date:   Tue Feb 2 10:57:09 2021 -0800

    KVM: x86/mmu: Add lockdep when setting a TDP MMU SPTE
    
    [ Upstream commit 3a9a4aa5657471a02ffb7f9b7f3b7a468b3f257b ]
    
    Add lockdep to __tdp_mmu_set_spte to ensure that SPTEs are only modified
    under the MMU lock.
    
    No functional change intended.
    
    Reviewed-by: Peter Feiner <pfeiner@xxxxxxxxxx>
    Reviewed-by: Sean Christopherson <seanjc@xxxxxxxxxx>
    Acked-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>
    Signed-off-by: Ben Gardon <bgardon@xxxxxxxxxx>
    Message-Id: <20210202185734.1680553-4-bgardon@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 61be95c6db20..ad9f8f187045 100644
--- a/arch/x86/kvm/mmu/tdp_mmu.c
+++ b/arch/x86/kvm/mmu/tdp_mmu.c
@@ -363,6 +363,8 @@ static inline void __tdp_mmu_set_spte(struct kvm *kvm, struct tdp_iter *iter,
 	struct kvm_mmu_page *root = sptep_to_sp(root_pt);
 	int as_id = kvm_mmu_page_as_id(root);
 
+	lockdep_assert_held(&kvm->mmu_lock);
+
 	WRITE_ONCE(*iter->sptep, new_spte);
 
 	__handle_changed_spte(kvm, as_id, iter->gfn, iter->old_spte, new_spte,



[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