Re: [Qemu-devel] [PATCH] qapi: add info about reset to SHUTDOWN event

2018-10-23 Thread Dominik Csapak
On 10/17/18 4:43 PM, Paolo Bonzini wrote: On 17/10/2018 15:54, Eric Blake wrote: So the problem with shutdown_caused_by_guest is that you get the same value for both guest reset and guest shutdown.  Could we instead just pass the ShutdownCause in the event (similar to what was proposed even whe

Re: [Qemu-devel] [PATCH] qapi: add info about reset to SHUTDOWN event

2018-10-17 Thread Paolo Bonzini
On 17/10/2018 15:54, Eric Blake wrote: >> >> So the problem with shutdown_caused_by_guest is that you get the same >> value for both guest reset and guest shutdown.  Could we instead just >> pass the ShutdownCause in the event (similar to what was proposed even >> when discussing commit 08fba7ac9b6

Re: [Qemu-devel] [PATCH] qapi: add info about reset to SHUTDOWN event

2018-10-17 Thread Dominik Csapak
On 10/17/18 3:51 PM, Eric Blake wrote: On 10/17/18 2:17 AM, Dominik Csapak wrote: On 10/8/18 3:19 PM, Dominik Csapak wrote: when '-no-reboot' is set, it is interesting if the guest was originally shutdown or reset, so save and return that info Signed-off-by: Dominik Csapak ---   qapi/run-stat

Re: [Qemu-devel] [PATCH] qapi: add info about reset to SHUTDOWN event

2018-10-17 Thread Eric Blake
On 10/17/18 5:58 AM, Paolo Bonzini wrote: -    qapi_event_send_shutdown(shutdown_caused_by_guest(request)); +    qapi_event_send_shutdown(shutdown_caused_by_guest(request), + shutdown_was_reset); So the problem with shutdown_caused_by_guest is that you g

Re: [Qemu-devel] [PATCH] qapi: add info about reset to SHUTDOWN event

2018-10-17 Thread Eric Blake
On 10/17/18 2:17 AM, Dominik Csapak wrote: On 10/8/18 3:19 PM, Dominik Csapak wrote: when '-no-reboot' is set, it is interesting if the guest was originally shutdown or reset, so save and return that info Signed-off-by: Dominik Csapak ---   qapi/run-state.json | 5 -   vl.c    |

Re: [Qemu-devel] [PATCH] qapi: add info about reset to SHUTDOWN event

2018-10-17 Thread Paolo Bonzini
On 17/10/2018 13:34, Dominik Csapak wrote: > i would find it nicer to always be able to distinguish between > a reset and a normal exit, since it would be less work on the > management side (i.e. we would have to handle the qmp reset elsewhere > instead of in the same process that monitors the even

Re: [Qemu-devel] [PATCH] qapi: add info about reset to SHUTDOWN event

2018-10-17 Thread Dominik Csapak
On 10/17/18 12:58 PM, Paolo Bonzini wrote: On 17/10/2018 09:17, Dominik Csapak wrote: On 10/8/18 3:19 PM, Dominik Csapak wrote: when '-no-reboot' is set, it is interesting if the guest was originally shutdown or reset, so save and return that info   {   if (no_reboot && reason != SHUTD

Re: [Qemu-devel] [PATCH] qapi: add info about reset to SHUTDOWN event

2018-10-17 Thread Paolo Bonzini
On 17/10/2018 09:17, Dominik Csapak wrote: > On 10/8/18 3:19 PM, Dominik Csapak wrote: >> when '-no-reboot' is set, it is interesting if the guest was originally >> shutdown or reset, so save and return that info > > >   { >   if (no_reboot && reason != SHUTDOWN_CAUSE_SUBSYSTEM_RESET) { > +  

Re: [Qemu-devel] [PATCH] qapi: add info about reset to SHUTDOWN event

2018-10-17 Thread Dominik Csapak
On 10/8/18 3:19 PM, Dominik Csapak wrote: when '-no-reboot' is set, it is interesting if the guest was originally shutdown or reset, so save and return that info Signed-off-by: Dominik Csapak --- qapi/run-state.json | 5 - vl.c| 5 - 2 files changed, 8 insertions(+),

[Qemu-devel] [PATCH] qapi: add info about reset to SHUTDOWN event

2018-10-08 Thread Dominik Csapak
when '-no-reboot' is set, it is interesting if the guest was originally shutdown or reset, so save and return that info Signed-off-by: Dominik Csapak --- qapi/run-state.json | 5 - vl.c| 5 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/qapi/run-state.js