From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755827AbdBQJIF (ORCPT ); Fri, 17 Feb 2017 04:08:05 -0500 Received: from mail.skyhub.de ([78.46.96.112]:34139 "EHLO mail.skyhub.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754805AbdBQJH4 (ORCPT ); Fri, 17 Feb 2017 04:07:56 -0500 Date: Fri, 17 Feb 2017 10:07:35 +0100 From: Borislav Petkov To: xlpang@redhat.com Cc: x86@kernel.org, linux-kernel@vger.kernel.org, kexec@lists.infradead.org, Tony Luck , Ingo Molnar , Dave Young , Prarit Bhargava , Junichi Nomura , Kiyoshi Ueda , Naoya Horiguchi , Peter Zijlstra , Thomas Gleixner Subject: Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after system panic Message-ID: <20170217090735.ls5pmtsfwkf3q5h6@pd.tnic> References: <20170123145056.fyraeehjfnwmmfb6@pd.tnic> <5886AD91.10803@redhat.com> <20170124122212.3dpdex5wjallypis@pd.tnic> <5889976A.9020802@redhat.com> <20170126064400.wfsn5pzxnpi6gcuk@pd.tnic> <58A53A65.3000405@redhat.com> <20170216101845.vkmnde4v6v72dgzx@pd.tnic> <58A59269.3050706@redhat.com> <20170216122215.uvrckt25g2msfxhe@pd.tnic> <58A65791.4090600@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <58A65791.4090600@redhat.com> User-Agent: NeoMutt/20161014 (1.7.1) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 17, 2017 at 09:53:21AM +0800, Xunlei Pang wrote: > It changes the value of cpu_online_mask/etc which will cause confusion to vmcore analysis. Then export the crashing_cpu variable, initialize it to something invalid in the first kernel, -1 for example, and test it in the #MC handlier like this: int cpu; ... cpu = smp_processor_id(); if (cpu_is_offline(cpu) || ((crashing_cpu != -1) && (crashing_cpu != cpu)) { u64 mcgstatus; mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS); if (mcgstatus & MCG_STATUS_RIPV) { mce_wrmsrl(MSR_IA32_MCG_STATUS, 0); return; } } > Moreover, for the code(see comment inlined) > > if (cpu_is_offline(smp_processor_id())) { > u64 mcgstatus; > > mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS); > if (mcgstatus & MCG_STATUS_RIPV) { // This condition may be not true, the mce triggered on kdump cpu > // doesn't need to have this bit set for the other cpus remain in 1st kernel. Is this on kvm or on a real hardware? Because for kvm I don't care. And don't say "theoretically". -- Regards/Gruss, Boris. Good mailing practices for 400: avoid top-posting and trim the reply.