From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fGPsf-0003PO-Hd for qemu-devel@nongnu.org; Wed, 09 May 2018 10:15:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fGPsa-0002ue-KW for qemu-devel@nongnu.org; Wed, 09 May 2018 10:15:45 -0400 References: <20180424101859.10239-1-david@redhat.com> From: David Hildenbrand Message-ID: <7c418965-f96f-fbbc-0010-8dd853280f6b@redhat.com> Date: Wed, 9 May 2018 16:15:38 +0200 MIME-Version: 1.0 In-Reply-To: <20180424101859.10239-1-david@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1] s390x: refactor reset/reipl handling List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-s390x@nongnu.org Cc: qemu-devel@nongnu.org, Richard Henderson , Alexander Graf , Cornelia Huck , Christian Borntraeger , Thomas Huth , Paolo Bonzini On 24.04.2018 12:18, David Hildenbrand wrote: > Calling pause_all_vcpus()/resume_all_vcpus() from a VCPU thread might > not be the best idea. As pause_all_vcpus() temporarily drops the qemu > mutex, two parallel calls to pause_all_vcpus() can be active at a time, > resulting in a deadlock. (either by two VCPUs or by the main thread and a > VCPU) > > Let's handle it via the main loop instead, as suggested by Paolo. If we > would have two parallel reset requests by two different VCPUs at the > same time, the last one would win. > > We use the existing ipl device to handle it. The nice side effect is > that we can get rid of reipl_requested. > > This change implies that all reset handling now goes via the common > path, so "no-reboot" handling is now active for all kinds of reboots. > > Let's execute any CPU initialization code on the target CPU using > run_on_cpu. > > Signed-off-by: David Hildenbrand > --- > > RFC -> v1: > - initital -> initial > - get rid of goto > - store CPU index instead of CPU. Fallback to any CPU in case not found > - handle default case in switch-case Very friendly ping :) -- Thanks, David / dhildenb