From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vitaly Kuznetsov Subject: Re: [PATCH v9 06/11] xen: Introduce XEN_DOMCTL_soft_reset Date: Fri, 17 Jul 2015 14:30:12 +0200 Message-ID: <87mvyvnezv.fsf@vitty.brq.redhat.com> References: <1437064046-12174-1-git-send-email-vkuznets@redhat.com> <1437064046-12174-7-git-send-email-vkuznets@redhat.com> <20150716184507.GH14309@x230.dumpdata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1ZG4sG-0001bF-Ja for xen-devel@lists.xenproject.org; Fri, 17 Jul 2015 12:36:20 +0000 In-Reply-To: <20150716184507.GH14309@x230.dumpdata.com> (Konrad Rzeszutek Wilk's message of "Thu, 16 Jul 2015 14:45:07 -0400") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Konrad Rzeszutek Wilk Cc: Wei Liu , Andrew Jones , Keir Fraser , Ian Campbell , Stefano Stabellini , Andrew Cooper , Julien Grall , Ian Jackson , Olaf Hering , Tim Deegan , David Vrabel , Jan Beulich , xen-devel@lists.xenproject.org, Daniel De Graaf List-Id: xen-devel@lists.xenproject.org Konrad Rzeszutek Wilk writes: >> >> @@ -1010,6 +1017,29 @@ int domain_unpause_by_systemcontroller(struct domain *d) >> return 0; >> } >> >> +int domain_soft_reset(struct domain *d) >> +{ >> + struct vcpu *v; >> + int rc; >> + >> + spin_lock(&d->shutdown_lock); >> + for_each_vcpu ( d, v ) >> + if ( !v->paused_for_shutdown ) >> + return -EINVAL; > > Ahem. You leave the spinlock still locked :-( > Ouch... :-( -- Vitaly