Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1219209
| From | "Raj, Ashok" <ashok.raj@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [Patch V0] x86, mce: Don't clear global error reporting banks during cpu_offline |
| Date | 2015-09-04 19:10 +0200 |
| Message-ID | <q52EX-8lv-19@gated-at.bofh.it> (permalink) |
| References | <q4Gl3-1yZ-1@gated-at.bofh.it> <q4XOV-1aO-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Boris
On Fri, Sep 04, 2015 at 01:50:29PM +0200, Borislav Petkov wrote:
> > Intel Secure Guard eXtentions will be disabled when these controls are cleared
> > from a security perspective. This patch enables SGX to work across
> > suspend/resume.
>
> What does that mean? What does SGX have to do with MCI_CTL registers?
> Explain that in the commit message so that !Intel people can understand.
I will add something more in the commit log and resubmit. Tony had the right
explanation in his response..
> For the whole patch text do:
>
> s/cpu/CPU/
>
> s/CPU's/CPUs/ and s/MSR's/MSRs/ if you mean plural. Also spellcheck all text.
Will do.
> > +static void _vendor_disable_error_reporting(void)
>
> Why the "_" prepended here?
Hummm.. just tried to keep the style as other parts of mcheck_cpu_init()
where we have _mcheck_cpu_init_vendor(). Its not a rule, but sometimes
local static functions have "__" varient.
Maybe it should have been the double "__"?
>
> > +{
> > + struct cpuinfo_x86 *c = &boot_cpu_data;
> > +
> > + switch (c->x86_vendor) {
> > + case X86_VENDOR_INTEL:
> > + /*
> > + * Don't clear on Intel CPU's. Some of these MSR's are
> > + * socket wide. Disabling them for just a single cpu offline
> > + * is bad, since it will inhibit reporting for all shared
> > + * resources.. such as LLC, iMC for e.g.
> > + */
> > + break;
> > + default:
> > + /*
> > + * Disble MCE reporting for all other CPU Vendor.
> > + * Don't want to break functionality on those
> > + */
> > + mce_disable_error_reporting();
> > + }
>
> I think the switch-case makes this unnecessarily bloated as code. Just
> do:
Makes sense... i will switch it as suggested.
>
> if (boot_cpu_data.x86_vendor == X86_VENDOR_INTEL)
> return;
>
> mce_disable_error_reporting();
>
> ...
>
Cheers,
Ashok
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[Patch V0] x86, mce: Don't clear global error reporting banks during cpu_offline Ashok Raj <ashok.raj@intel.com> - 2015-09-03 19:20 +0200
Re: [Patch V0] x86, mce: Don't clear global error reporting banks during cpu_offline Borislav Petkov <bp@alien8.de> - 2015-09-04 14:00 +0200
RE: [Patch V0] x86, mce: Don't clear global error reporting banks during cpu_offline "Luck, Tony" <tony.luck@intel.com> - 2015-09-04 18:40 +0200
Re: [Patch V0] x86, mce: Don't clear global error reporting banks during cpu_offline "Raj, Ashok" <ashok.raj@intel.com> - 2015-09-04 19:10 +0200
Re: [Patch V0] x86, mce: Don't clear global error reporting banks during cpu_offline Borislav Petkov <bp@alien8.de> - 2015-09-05 17:40 +0200
csiph-web