Re: [Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN

2017-04-20 Thread Alistair Francis
On Thu, Apr 20, 2017 at 12:05 PM, Eric Blake wrote: > On 04/20/2017 11:18 AM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> On 04/20/2017 06:59 AM, Markus Armbruster wrote: >>> No objection to Alistair's idea to turn this into an

Re: [Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN

2017-04-20 Thread Eric Blake
On 04/19/2017 05:22 PM, Eric Blake wrote: > Libvirt would like to be able to distinguish between a SHUTDOWN > event triggered solely by guest request and one triggered by a > SIGTERM or other action on the host. qemu_kill_report() is > already able to tell whether a shutdown was triggered by a

Re: [Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN

2017-04-20 Thread Eric Blake
On 04/20/2017 11:18 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 04/20/2017 06:59 AM, Markus Armbruster wrote: >> >>> >>> No objection to Alistair's idea to turn this into an enumeration. >> >> Question - should the enum be more than just 'guest' and 'host'? For

Re: [Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN

2017-04-20 Thread Eric Blake
On 04/20/2017 11:12 AM, Markus Armbruster wrote: >>> 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

Re: [Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN

2017-04-20 Thread Markus Armbruster
Eric Blake writes: > On 04/20/2017 06:59 AM, Markus Armbruster wrote: > >> >> No objection to Alistair's idea to turn this into an enumeration. > > Question - should the enum be more than just 'guest' and 'host'? For > example, my patch proves that we have a lot of places

Re: [Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN

2017-04-20 Thread Markus Armbruster
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

Re: [Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN

2017-04-20 Thread Eric Blake
On 04/20/2017 06:59 AM, Markus Armbruster wrote: > > No objection to Alistair's idea to turn this into an enumeration. Question - should the enum be more than just 'guest' and 'host'? For example, my patch proves that we have a lot of places that handle complimentary machine commands to reset

Re: [Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN

2017-04-20 Thread Eric Blake
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 >>> +#

Re: [Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN

2017-04-20 Thread Daniel P. Berrange
On Thu, Apr 20, 2017 at 01:59:29PM +0200, Markus Armbruster wrote: > Eric Blake writes: > > > Libvirt would like to be able to distinguish between a SHUTDOWN > > event triggered solely by guest request and one triggered by a > > SIGTERM or other action on the host.

Re: [Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN

2017-04-20 Thread Markus Armbruster
Eric Blake writes: > Libvirt would like to be able to distinguish between a SHUTDOWN > event triggered solely by guest request and one triggered by a > SIGTERM or other action on the host. qemu_kill_report() is > already able to tell whether a shutdown was triggered by a host

Re: [Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN

2017-04-19 Thread Eric Blake
On 04/19/2017 05:36 PM, Alistair Francis wrote: > On Wed, Apr 19, 2017 at 3:22 PM, Eric Blake wrote: >> Libvirt would like to be able to distinguish between a SHUTDOWN >> event triggered solely by guest request and one triggered by a >> SIGTERM or other action on the host.

Re: [Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN

2017-04-19 Thread Alistair Francis
On Wed, Apr 19, 2017 at 3:22 PM, Eric Blake wrote: > Libvirt would like to be able to distinguish between a SHUTDOWN > event triggered solely by guest request and one triggered by a > SIGTERM or other action on the host. qemu_kill_report() is > already able to tell whether a

[Qemu-devel] [PATCH v2] event: Add source information to SHUTDOWN

2017-04-19 Thread Eric Blake
Libvirt would like to be able to distinguish between a SHUTDOWN event triggered solely by guest request and one triggered by a SIGTERM or other action on the host. qemu_kill_report() is already able to tell whether a shutdown was triggered by a host signal (but NOT by a host UI event, such as