[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220910181143.GC699006@ls.amr.corp.intel.com>
Date: Sat, 10 Sep 2022 11:11:43 -0700
From: Isaku Yamahata <isaku.yamahata@...il.com>
To: Chao Gao <chao.gao@...el.com>
Cc: isaku.yamahata@...el.com, linux-kernel@...r.kernel.org,
kvm@...r.kernel.org, Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <seanjc@...gle.com>,
Marc Zyngier <maz@...nel.org>, Will Deacon <will@...nel.org>,
Yuan Yao <yuan.yao@...ux.intel.com>, isaku.yamahata@...il.com,
Kai Huang <kai.huang@...el.com>,
Atish Patra <atishp@...shpatra.org>,
Shaokun Zhang <zhangshaokun@...ilicon.com>,
Qi Liu <liuqi115@...wei.com>,
John Garry <john.garry@...wei.com>,
Daniel Lezcano <daniel.lezcano@...aro.org>,
Huang Ying <ying.huang@...el.com>,
Huacai Chen <chenhuacai@...nel.org>
Subject: Re: [PATCH v4 10/26] KVM: Drop kvm_count_lock and instead protect
kvm_usage_count with kvm_lock
On Fri, Sep 09, 2022 at 11:05:34AM +0800,
Chao Gao <chao.gao@...el.com> 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@...il.com>
Powered by blists - more mailing lists