From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: "Jürgen Groß" <jgross@suse.com>,
"Dongli Zhang" <dongli.zhang@oracle.com>,
xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Cc: sstabellini@kernel.org, joe.jin@oracle.com, rose.wang@oracle.com
Subject: Re: [PATCH 1/1] xen/manage: enable C_A_D to force reboot
Date: Fri, 15 May 2020 13:26:16 -0400 [thread overview]
Message-ID: <8b237bf7-3862-b3c1-e2ec-07a174c1e315@oracle.com> (raw)
In-Reply-To: <e604a96d-087e-573b-c3bf-fc53005f8994@suse.com>
On 5/15/20 3:01 AM, Jürgen Groß wrote:
> On 14.05.20 01:34, Dongli Zhang wrote:
>> The systemd may be configured to mask ctrl-alt-del via "systemctl mask
>> ctrl-alt-del.target". As a result, the pv reboot would not work as
>> signal
>> is ignored.
>>
>> This patch always enables C_A_D before the call of ctrl_alt_del() in
>> order
>> to force the reboot.
>
> Hmm, I'm not sure this is a good idea.
>
> Suppose a guest admin is doing a critical update and wants to avoid a
> sudden reboot in between. By masking the reboot this would be possible,
> with your patch it isn't.
>
> In case a reboot is really mandatory it would still be possible to just
> kill the guest.
>
> I'm not completely opposed to the patch, but I think this is a change
> which should not be done easily.
I think 'xl reboot -F' should do be handling this scenario but (1) it is
currently not quite set up for this and (2) I can't see how it works at
all given that noone handles LIBXL_TRIGGER_RESET in
arch_do_domctl(XEN_DOMCTL_sendtrigger).
-boris
>
>
> Juergen
>
>>
>> Reported-by: Rose Wang <rose.wang@oracle.com>
>> Cc: Joe Jin <joe.jin@oracle.com>
>> Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
>> Signed-off-by: Dongli Zhang <dongli.zhang@oracle.com>
>> ---
>> drivers/xen/manage.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
>> index cd046684e0d1..3190d0ecb52e 100644
>> --- a/drivers/xen/manage.c
>> +++ b/drivers/xen/manage.c
>> @@ -204,6 +204,13 @@ static void do_poweroff(void)
>> static void do_reboot(void)
>> {
>> shutting_down = SHUTDOWN_POWEROFF; /* ? */
>> + /*
>> + * The systemd may be configured to mask ctrl-alt-del via
>> + * "systemctl mask ctrl-alt-del.target". As a result, the pv reboot
>> + * would not work. To enable C_A_D would force the reboot.
>> + */
>> + C_A_D = 1;
>> +
>> ctrl_alt_del();
>> }
>>
>
prev parent reply other threads:[~2020-05-15 17:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 23:34 Dongli Zhang
2020-05-15 7:01 ` Jürgen Groß
2020-05-15 17:26 ` Boris Ostrovsky [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=8b237bf7-3862-b3c1-e2ec-07a174c1e315@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=dongli.zhang@oracle.com \
--cc=jgross@suse.com \
--cc=joe.jin@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rose.wang@oracle.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®