Re: [PATCH 5/6] KVM: x86: Remove WARN_ON in kvm_arch_check_processor_compat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux