Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1582525

Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after system panic

From Borislav Petkov <bp@alien8.de>
Newsgroups linux.kernel
Subject Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after system panic
Date 2017-02-16 13:30 +0100
Message-ID <tbtm9-66o-1@gated-at.bofh.it> (permalink)
References (5 earlier) <t3LJf-3UC-1@gated-at.bofh.it> <t3M2B-415-9@gated-at.bofh.it> <tbmXo-1HS-9@gated-at.bofh.it> <tbrkm-4KJ-19@gated-at.bofh.it> <tbsT7-5Hw-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Feb 16, 2017 at 07:52:09PM +0800, Xunlei Pang wrote:
>     then mce will be broadcast to the other cpus which are still running
>     in the first kernel(i.e. looping in crash_nmi_callback).

Simple: the crash code should really mark CPUs as not being online:

void do_machine_check(struct pt_regs *regs, long error_code)

	...

        /* If this CPU is offline, just bail out. */
        if (cpu_is_offline(smp_processor_id())) {
                u64 mcgstatus;

                mcgstatus = mce_rdmsrl(MSR_IA32_MCG_STATUS);
                if (mcgstatus & MCG_STATUS_RIPV) {
                        mce_wrmsrl(MSR_IA32_MCG_STATUS, 0);
                        return;
                }
        }

because looping in crash_nmi_callback() does not really denote them as
CPUs being online.

And just so that you don't disturb the machine too much during crashing,
you could simply clear them from the online masks, i.e., perhaps call
remove_cpu_from_maps() with the proper locking around it instead of
doing a full cpu_down().

The machine will be killed anyway after kdump is done writing out
memory.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after  system panic Xunlei Pang <xpang@redhat.com> - 2017-02-16 06:40 +0100
  Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after  system panic Borislav Petkov <bp@alien8.de> - 2017-02-16 11:20 +0100
    Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after  system panic Xunlei Pang <xpang@redhat.com> - 2017-02-16 13:00 +0100
      Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after  system panic Borislav Petkov <bp@alien8.de> - 2017-02-16 13:30 +0100
        Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after  system panic Xunlei Pang <xpang@redhat.com> - 2017-02-17 03:00 +0100
          Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after  system panic Borislav Petkov <bp@alien8.de> - 2017-02-17 10:10 +0100
            Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after  system panic Xunlei Pang <xpang@redhat.com> - 2017-02-17 17:20 +0100
              RE: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after  system panic "Luck, Tony" <tony.luck@intel.com> - 2017-02-21 19:50 +0100
                Re: [PATCH] x86/mce: Keep quiet in case of broadcasted mce after  system panic Xunlei Pang <xpang@redhat.com> - 2017-02-22 06:50 +0100

csiph-web