From: Dongli Zhang <dongli.zhang@oracle.com>
To: xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org
Cc: boris.ostrovsky@oracle.com, jgross@suse.com,
sstabellini@kernel.org, joe.jin@oracle.com, rose.wang@oracle.com
Subject: [PATCH 1/1] xen/manage: enable C_A_D to force reboot
Date: Wed, 13 May 2020 16:34:10 -0700 [thread overview]
Message-ID: <20200513233410.18120-1-dongli.zhang@oracle.com> (raw)
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.
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();
}
--
2.17.1
next reply other threads:[~2020-05-13 23:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-13 23:34 Dongli Zhang [this message]
2020-05-15 7:01 ` Jürgen Groß
2020-05-15 17:26 ` Boris Ostrovsky
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=20200513233410.18120-1-dongli.zhang@oracle.com \
--to=dongli.zhang@oracle.com \
--cc=boris.ostrovsky@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®