Re: [PATCH v2] x86/power: Fix 'nosmt' vs. hibernation triple fault during resume

From: Jiri Kosina
Date: Wed May 29 2019 - 12:30:32 EST


On Wed, 29 May 2019, Josh Poimboeuf wrote:

> hibernation_restore() is called by user space at runtime, via ioctl or
> sysfs. So I think this still doesn't fix the case where you've disabled
> CPUs at runtime via sysfs, and then resumed from hibernation. Or are we
> declaring that this is not a supported scenario?

Yeah I personally find that scenario awkward :) Anyway, cpuhp_smt_enable()
is going to online even those potentially "manually" offlined CPUs, isn't
it?

Are you perhaps suggesting to call enable_nonboot_cpus() instead of
cpuhp_smt_enable() here to make it more explicit?

> Is there are reason why maxcpus= doesn't do the CR4.MCE booted_once
> dance?

I am not sure whether it's really needed. My understanding is that the MCE
issue happens only after primary sibling has been brought up; if that
never happened, MCE wouldn't be broadcasted to that core at all in the
first place.

But this needs to be confirmed by Intel.

--
Jiri Kosina
SUSE Labs