On Mon, Jan 17, 2022, Chao Gao wrote: > On Mon, Jan 17, 2022 at 09:35:04PM +0800, Chao Gao wrote: > >OK. How about: > > > > /* > > * Compatibility checks are done when loading KVM or in KVM's CPU > > * hotplug callback. It ensures all online CPUs are compatible before > > * running any vCPUs. For other cases, compatibility checks are > > * unnecessary or even problematic. Try to detect improper usages here. > > */ > > WARN_ON(!irqs_disabled() && !cpu_active(smp_processor_id())); > > Sorry. It should be: > WARN_ON(!irqs_disabled() && cpu_active(smp_processor_id())); Nice! That's exactly what I was hoping we could do.