lkml.org 
[lkml]   [2022]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 5/6] KVM: x86: Remove WARN_ON in kvm_arch_check_processor_compat
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.

\
 
 \ /
  Last update: 2022-01-19 01:34    [W:0.652 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site