From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37754) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d85dm-0006Xi-AI for qemu-devel@nongnu.org; Tue, 09 May 2017 09:57:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d85dg-00042d-Kb for qemu-devel@nongnu.org; Tue, 09 May 2017 09:57:26 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:42656 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d85dg-00042X-Dz for qemu-devel@nongnu.org; Tue, 09 May 2017 09:57:20 -0400 Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.20/8.16.0.20) with SMTP id v49DrkLf011898 for ; Tue, 9 May 2017 09:57:19 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0b-001b2d01.pphosted.com with ESMTP id 2ab02j6bu4-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 09 May 2017 09:57:18 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 9 May 2017 14:57:15 +0100 Date: Tue, 9 May 2017 15:57:02 +0200 From: Cornelia Huck In-Reply-To: <20170508211953.28017-4-eblake@redhat.com> References: <20170508211953.28017-1-eblake@redhat.com> <20170508211953.28017-4-eblake@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: <20170509155702.0d7cb606.cornelia.huck@de.ibm.com> Subject: Re: [Qemu-devel] [PATCH v7 3/5] shutdown: Add source information to SHUTDOWN and RESET List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake Cc: qemu-devel@nongnu.org, armbru@redhat.com, berrange@redhat.com, alistair.francis@xilinx.com, "Michael S. Tsirkin" , Igor Mammedov , Rob Herring , Peter Maydell , Jan Kiszka , Andrzej Zaborowski , Paolo Bonzini , Richard Henderson , Eduardo Habkost , Stefano Stabellini , Anthony Perard , Paul Burton , Aurelien Jarno , Yongbok Kim , Alexander Graf , Mark Cave-Ayland , "Edgar E. Iglesias" , David Gibson , Christian Borntraeger , Magnus Damm , Michael Walle , Max Filippov , Stefan Weil , Pavel Dovgalyuk , Marcelo Tosatti , Artyom Tarasenko , Gerd Hoffmann , "open list:Calxeda Highbank" , "open list:X86" , "open list:Old World" , "open list:Overall" On Mon, 8 May 2017 16:19:51 -0500 Eric Blake wrote: > Time to wire up all the call sites that request a shutdown or > reset to use the enum added in the previous patch. > > It would have been less churn to keep the common case with no > arguments as meaning guest-triggered, and only modified the > host-triggered code paths, via a wrapper function, but then we'd > still have to audit that I didn't miss any host-triggered spots; > changing the signature forces us to double-check that I correctly > categorized all callers. > > Since command line options can change whether a guest reset request > causes an actual reset vs. a shutdown, it's easy to also add the > information to reset requests. > > Replay adds a FIXME to preserve the cause across the replay stream, > that will be tackled in the next patch. > > Signed-off-by: Eric Blake > Acked-by: David Gibson [ppc parts] > Reviewed-by: Mark Cave-Ayland [SPARC part] > diff --git a/target/s390x/helper.c b/target/s390x/helper.c > index 68bd2f9..d2bb9aa 100644 > --- a/target/s390x/helper.c > +++ b/target/s390x/helper.c > @@ -266,7 +266,7 @@ void load_psw(CPUS390XState *env, uint64_t mask, uint64_t addr) > S390CPU *cpu = s390_env_get_cpu(env); > if (s390_cpu_halt(cpu) == 0) { > #ifndef CONFIG_USER_ONLY > - qemu_system_shutdown_request(); > + qemu_system_shutdown_request(SHUTDOWN_CAUSE_GUEST_SHUTDOWN); Looking at this, I think the non-kvm code path might want some panic handling for disabled wait, but that would be an orthogonal change and this transformation looks reasonable. > #endif > } > } s390x parts: Reviewed-by: Cornelia Huck