Re: [PATCH 27/28] KVM: x86/mmu: Do remote TLB flush before dropping RCU in TDP MMU resched

From: Paolo Bonzini
Date: Tue Nov 30 2021 - 06:29:41 EST


On 11/20/21 05:50, Sean Christopherson wrote:
if (need_resched() || rwlock_needbreak(&kvm->mmu_lock)) {
- rcu_read_unlock();
-
if (flush)
kvm_flush_remote_tlbs(kvm);
+ rcu_read_unlock();
+

Couldn't this sleep in kvm_make_all_cpus_request, whilst in an RCU read-side critical section?

Paolo