On 23/06/21 13:29, Maxim Levitsky wrote:
+ kvm_block_guest_entries(kvm); + trace_kvm_apicv_update_request(activate, bit); if (kvm_x86_ops.pre_update_apicv_exec_ctrl) static_call(kvm_x86_pre_update_apicv_exec_ctrl)(kvm, activate); @@ -9243,6 +9245,8 @@ void kvm_request_apicv_update(struct kvm *kvm, bool activate, ulong bit) except = kvm_get_running_vcpu(); kvm_make_all_cpus_request_except(kvm, KVM_REQ_APICV_UPDATE, except); + + kvm_allow_guest_entries(kvm);
Doesn't this cause a busy loop during synchronize_rcu? It should be possible to request the vmexit of other CPUs from avic_update_access_page, and do a lock/unlock of kvm->slots_lock to wait for the memslot to be updated.
(As an aside, I'd like to get rid of KVM_REQ_MCLOCK_IN_PROGRESS in 5.15...). Paolo