From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Armbruster Subject: Re: [Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN Date: Thu, 20 Apr 2017 18:12:42 +0200 Message-ID: <87r30n83d1.fsf@dusky.pond.sub.org> References: <20170419222258.13415-1-eblake@redhat.com> <87k26fffxa.fsf@dusky.pond.sub.org> <20170420120922.GJ20955@redhat.com> <1f4e72ed-fab1-7099-768e-2a111df3a633@redhat.com> Mime-Version: 1.0 Content-Type: text/plain Cc: "Daniel P. Berrange" , Peter Maydell , "open list\:Overall" , "Michael S. Tsirkin" , Mark Cave-Ayland , qemu-devel@nongnu.org, Scott Wood , Gerd Hoffmann , "Edgar E. Iglesias" , Rob Herring , Stefano Stabellini , Magnus Damm , Alexander Graf , Christian Borntraeger , Anthony Perard , "open list\:X86" , Richard Henderson , Artyom Tarasenko , Eduardo Habkost Return-path: Received: from mx1.redhat.com ([209.132.183.28]:40980 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033162AbdDTQMz (ORCPT ); Thu, 20 Apr 2017 12:12:55 -0400 In-Reply-To: <1f4e72ed-fab1-7099-768e-2a111df3a633@redhat.com> (Eric Blake's message of "Thu, 20 Apr 2017 08:20:11 -0500") Sender: kvm-owner@vger.kernel.org List-ID: Eric Blake writes: > On 04/20/2017 07:09 AM, Daniel P. Berrange wrote: > >>>> +++ b/qapi/event.json >>>> @@ -10,6 +10,10 @@ >>>> # Emitted when the virtual machine has shut down, indicating that qemu is >>>> # about to exit. >>>> # >>>> +# @guest: If true, the shutdown was triggered by a guest request (such as >>>> +# executing a halt instruction) rather than a host request (such as sending >>>> +# qemu a SIGINT). (since 2.10) >>>> +# >>> >>> "executing a halt instruction" suggests "halt" is a machine instruction. > > Which is indeed what most of the places I patched to pass 'true' are > emulating - the machine halt instruction. > >>> I think you mean /usr/sbin/halt. Suggest something like "executing a >>> halt command". >> >> Well technically /usr/sbin/halt just terminates all processes / kernel and >> halts CPUs, but the virtual machine is still active (and a 'reset' in the >> monitor can start it again. /usr/sbin/poweroff is what actually does the >> ACPI poweroff to trigger QEMU to exit[1] > > I'm thinking of this wording: > > triggered by a guest request (such as the guest running > /usr/sbin/poweroff to trigger an ACPI shutdown or machine halt instruction) A quick glance at the patch suggests the instructions in question are typically writes to some device register. I wouldn't call them "halt instructions", in particular since there's the x86 "hlt" instruction that does something else.