diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-01-08 08:10:32 -0500 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-01-08 08:10:32 -0500 |
commit | 7f26fea9bc085290e3731501f4f8fc5b82b9d615 (patch) | |
tree | 8b26afdd1254db892073fe5e819c32b161ba193f /arch/x86/include/asm | |
parent | 3115d2de39b8762fdaebc3d222f2ad09f6a2f762 (diff) | |
parent | e59f75de4e501e87de7743fec29dd247a6ae6cd3 (diff) | |
download | linux-stable-7f26fea9bc085290e3731501f4f8fc5b82b9d615.tar.gz linux-stable-7f26fea9bc085290e3731501f4f8fc5b82b9d615.tar.bz2 linux-stable-7f26fea9bc085290e3731501f4f8fc5b82b9d615.zip |
Merge tag 'kvm-x86-mmu-6.8' of https://github.com/kvm-x86/linux into HEAD
KVM x86 MMU changes for 6.8:
- Fix a relatively benign off-by-one error when splitting huge pages during
CLEAR_DIRTY_LOG.
- Fix a bug where KVM could incorrectly test-and-clear dirty bits in non-leaf
TDP MMU SPTEs if a racing thread replaces a huge SPTE with a non-huge SPTE.
- Relax the TDP MMU's lockdep assertions related to holding mmu_lock for read
versus write so that KVM doesn't pass "bool shared" all over the place just
to have precise assertions in paths that don't actually care about whether
the caller is a reader or a writer.
Diffstat (limited to 'arch/x86/include/asm')
-rw-r--r-- | arch/x86/include/asm/kvm_host.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index c5e362e2116f..7bc1daf68741 100644 --- a/arch/x86/include/asm/kvm_host.h +++ b/arch/x86/include/asm/kvm_host.h @@ -1433,9 +1433,8 @@ struct kvm_arch { * the MMU lock in read mode + RCU or * the MMU lock in write mode * - * For writes, this list is protected by: - * the MMU lock in read mode + the tdp_mmu_pages_lock or - * the MMU lock in write mode + * For writes, this list is protected by tdp_mmu_pages_lock; see + * below for the details. * * Roots will remain in the list until their tdp_mmu_root_count * drops to zero, at which point the thread that decremented the @@ -1452,8 +1451,10 @@ struct kvm_arch { * - possible_nx_huge_pages; * - the possible_nx_huge_page_link field of kvm_mmu_page structs used * by the TDP MMU - * It is acceptable, but not necessary, to acquire this lock when - * the thread holds the MMU lock in write mode. + * Because the lock is only taken within the MMU lock, strictly + * speaking it is redundant to acquire this lock when the thread + * holds the MMU lock in write mode. However it often simplifies + * the code to do so. */ spinlock_t tdp_mmu_pages_lock; #endif /* CONFIG_X86_64 */ |