From: Markus Armbruster <armbru@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Eric Blake <eblake@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN
Date: Thu, 13 Apr 2017 09:30:45 +0200 [thread overview]
Message-ID: <87y3v4ojbu.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <c294a578-31ee-8f53-807e-82aa355df80d@redhat.com> (Paolo Bonzini's message of "Thu, 13 Apr 2017 14:11:26 +0800")
Paolo Bonzini <pbonzini@redhat.com> 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 <eblake@redhat.com>
>
> 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.
prev parent reply other threads:[~2017-04-13 7:30 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-06 21:09 [Qemu-devel] [PATCH] event: Add signal information to SHUTDOWN Eric Blake
2017-04-07 9:35 ` Daniel P. Berrange
2017-04-07 13:45 ` Eric Blake
2017-04-13 6:04 ` Paolo Bonzini
2017-04-12 11:02 ` Markus Armbruster
2017-04-12 11:05 ` Daniel P. Berrange
2017-04-12 13:15 ` Eric Blake
2017-04-12 13:52 ` Markus Armbruster
2017-04-12 14:03 ` Eric Blake
2017-04-12 14:33 ` Markus Armbruster
2017-04-12 14:48 ` Eric Blake
2017-04-13 6:11 ` Paolo Bonzini
2017-04-13 6:11 ` Paolo Bonzini
2017-04-13 7:30 ` Markus Armbruster [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y3v4ojbu.fsf@dusky.pond.sub.org \
--to=armbru@redhat.com \
--cc=eblake@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.