Re: [PATCH v4 10/26] KVM: Drop kvm_count_lock and instead protect kvm_usage_count with kvm_lock

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

 



On Fri, Sep 09, 2022 at 11:05:34AM +0800,
Chao Gao <chao.gao@xxxxxxxxx> wrote:

> >+	 * cpu_hotplug_disable() and other CPUs are offlined.  No need for
> >+	 * locking.
> >+	 */
> >+	lockdep_assert_not_held(&kvm_lock);
> >+
> >+	if (kvm_usage_count) {
> >+		preempt_disable();
> > 		hardware_disable_nolock(NULL);
> >+		preempt_enable();
> 
> kvm_suspend() is called with interrupt disabled. So, no need to disable
> preemption.
> 
> /**
>  * syscore_suspend - Execute all the registered system core suspend callbacks.
>  *
>  * This function is executed with one CPU on-line and disabled interrupts.
>  */
> int syscore_suspend(void)

Thanks, I'll fix it with a comment.
-- 
Isaku Yamahata <isaku.yamahata@xxxxxxxxx>



[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