linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Xishi Qiu <qiuxishi@huawei.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	the arch/x86 maintainers <x86@kernel.org>,
	<wanpeng.li@hotmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	<hidehiro.kawai.ez@hitachi.com>, <pbonzini@redhat.com>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Fengtiantian <fengtiantian@huawei.com>,
	Xiexiuqi <xiexiuqi@huawei.com>
Subject: [PATCH] x86: call smp vmxoff in smp stop
Date: Sat, 14 Jan 2017 09:36:25 +0800	[thread overview]
Message-ID: <58798099.1010000@huawei.com> (raw)
In-Reply-To: <586CCA5A.8050607@huawei.com>

From: Tiantian Feng <fengtiantian@huawei.com>

We need to disable VMX on all CPUs before stop cpu when OS panic, otherwisewe
risk hanging up the machine, because the CPU ignore INIT signals when VMX is enabled.
In kernel mainline this issue existence.

Signed-off-by: Tiantian Feng <fengtiantian@huawei.com>
---
 arch/x86/kernel/smp.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/smp.c b/arch/x86/kernel/smp.c
index 68f8cc2..6b64c6b 100644
--- a/arch/x86/kernel/smp.c
+++ b/arch/x86/kernel/smp.c
@@ -162,6 +162,7 @@ static int smp_stop_nmi_callback(unsigned int val, struct pt_regs *regs)
 	if (raw_smp_processor_id() == atomic_read(&stopping_cpu))
 		return NMI_HANDLED;
 
+	cpu_emergency_vmxoff();
 	stop_this_cpu(NULL);
 
 	return NMI_HANDLED;
@@ -174,6 +175,7 @@ static int smp_stop_nmi_callback(unsigned int val, struct pt_regs *regs)
 asmlinkage __visible void smp_reboot_interrupt(void)
 {
 	ipi_entering_ack_irq();
+	cpu_emergency_vmxoff();
 	stop_this_cpu(NULL);
 	irq_exit();
 }
-- 
1.8.3.1 . 

  parent reply	other threads:[~2017-01-14  1:41 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-04 10:11 [RFC PATCH] x86: call smp vmxoff in smp stop Xishi Qiu
2017-01-05  1:45 ` [RFC PATCH V2] " Xishi Qiu
2017-01-12 13:55   ` Paolo Bonzini
2017-01-14  1:42   ` [PATCH V3] " Xishi Qiu
2017-01-17 15:18     ` Paolo Bonzini
2017-01-18  2:19       ` Xishi Qiu
2017-01-18  9:30         ` Paolo Bonzini
2017-01-18 11:32     ` [PATCH V4] " Xishi Qiu
2017-04-18 13:34       ` Paolo Bonzini
2017-04-19  8:02         ` Ingo Molnar
2017-04-19  8:22           ` Paolo Bonzini
2017-04-19  9:50             ` Ingo Molnar
2017-01-14  1:36 ` Xishi Qiu [this message]
2017-01-14  1:41   ` [PATCH] " Xishi Qiu
2017-01-15  0:45   ` kbuild test robot

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=58798099.1010000@huawei.com \
    --to=qiuxishi@huawei.com \
    --cc=akpm@linux-foundation.org \
    --cc=fengtiantian@huawei.com \
    --cc=hidehiro.kawai.ez@hitachi.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=wanpeng.li@hotmail.com \
    --cc=x86@kernel.org \
    --cc=xiexiuqi@huawei.com \
    /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;
as well as URLs for NNTP newsgroup(s).