On 01/11/19 23:41, Suthikulpanit, Suravee wrote: > +void kvm_request_apicv_update(struct kvm *kvm, bool activate, ulong bit) > +{ > + if (activate) { > + if (!test_and_clear_bit(bit, &kvm->arch.apicv_deact_msk) || > + !kvm_apicv_activated(kvm)) > + return; > + } else { > + if (test_and_set_bit(bit, &kvm->arch.apicv_deact_msk) || > + kvm_apicv_activated(kvm)) > + return; > + } > + > + kvm_make_all_cpus_request(kvm, KVM_REQ_APICV_UPDATE); > +} > +EXPORT_SYMBOL_GPL(kvm_request_apicv_update); > + It's worth documenting the locking requirements of kvm_request_apicv_update (it can also be negative requirements, such as "don't hold any lock"), because kvm_make_all_cpus_request is a somewhat deadlock-prone API. Again, something I'll check after a more thorough review. Paolo