qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN
Date: Thu, 13 Apr 2017 09:30:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

Paolo Bonzini <address@hidden> writes:

> On 07/04/2017 05:09, Eric Blake wrote:
>
>> qemu_kill_report() is already able to tell whether a shutdown
>> was triggered by guest action (no output) or by a host signal
>> (a message about termination is printed via error_report); but
>> this information is then lost.  Libvirt would like to be able
>> to distinguish between a SHUTDOWN event triggered solely by
>> guest request and one triggered by a SIGTERM on the host.
>>
>> Enhance the SHUTDOWN event to pass the value of shutdown_signal
>> through to the monitor client, suitably remapped into a
>> platform-neutral string.  Note that mingw lacks decent signal
>> support, and will never report a signal because it never calls
>> qemu_system_killed().
>>
>> See also https://bugzilla.redhat.com/1384007
>> 
>> Signed-off-by: Eric Blake <address@hidden>
>
> I think this patch is fine for now; calling qemu_system_killed() from
> os-win32.c is an orthogonal improvement.

Fair enough.  However, I think the patch misses its stated goal even on
POSIX hosts: to let libvirt distinguish host- and guest-initiated
shutdown.  Shutdown on signal is only one kind of host-initiated
shutdown.  All the others remain indistinguishable from guest-initiated
shutdown.

To reach the goal, we can track all host-initiated shutdowns, or all
guest-initiated shutdowns.  Pick the one that's easier to track.  The
former probably involves messing with OS-specific code, the latter
probably doesn't.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]