linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC PATCH] x86: call smp vmxoff in smp stop
@ 2017-01-04 10:11 Xishi Qiu
  2017-01-05  1:45 ` [RFC PATCH V2] " Xishi Qiu
  2017-01-14  1:36 ` [PATCH] " Xishi Qiu
  0 siblings, 2 replies; 15+ messages in thread
From: Xishi Qiu @ 2017-01-04 10:11 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	the arch/x86 maintainers, wanpeng.li, Andrew Morton,
	hidehiro.kawai.ez, pbonzini
  Cc: LKML, Fengtiantian, Xiexiuqi

From: f00186668 <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: f00186668 <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 

^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2017-04-19  9:50 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH] " Xishi Qiu
2017-01-14  1:41   ` Xishi Qiu
2017-01-15  0:45   ` kbuild test robot

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).