From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34135) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjVZc-0003qp-Ta for qemu-devel@nongnu.org; Mon, 12 Sep 2016 14:03:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bjVZa-0006Ua-Vx for qemu-devel@nongnu.org; Mon, 12 Sep 2016 14:03:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40450) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bjVZa-0006UK-Qh for qemu-devel@nongnu.org; Mon, 12 Sep 2016 14:03:14 -0400 References: From: Paolo Bonzini Message-ID: Date: Mon, 12 Sep 2016 20:03:10 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [s390] possible deadlock in handle_sigp? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Christian Borntraeger , KVM list , Cornelia Huck , qemu-devel On 12/09/2016 19:37, Christian Borntraeger wrote: > On 09/12/2016 06:44 PM, Paolo Bonzini wrote: > > I think that two CPUs doing reciprocal SIGPs could in principle end up > > waiting on each other to complete their run_on_cpu. If the SIGP has to > > be synchronous the fix is not trivial (you'd have to put the CPU in a > > state similar to cpu->halted = 1), otherwise it's enough to replace > > run_on_cpu with async_run_on_cpu. > > IIRC the sigps are supossed to be serialized by the big QEMU lock. WIll > have a look. Yes, but run_on_cpu drops it when it waits on the qemu_work_cond condition variable. (Related: I stumbled upon it because I wanted to remove the BQL from run_on_cpu work items). Paolo