[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230622054053.uy577qezu5a65buc@treble>
Date: Wed, 21 Jun 2023 22:40:53 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Waiman Long <longman@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"H. Peter Anvin" <hpa@...or.com>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Jacob Pan <jacob.jun.pan@...ux.intel.com>,
Len Brown <lenb@...nel.org>, linux-kernel@...r.kernel.org,
x86@...nel.org, linux-pm@...r.kernel.org,
Robin Jarry <rjarry@...hat.com>, Joe Mario <jmario@...hat.com>
Subject: Re: [PATCH v3 1/3] x86/idle: Disable IBRS when cpu is offline
On Wed, Jun 21, 2023 at 08:36:01PM -0400, Waiman Long wrote:
> +/*
> + * naitve_play_dead() is essentially a __noreturn function, but it can't
> + * be marked as such as the compiler may complain about it.
> + */
FWIW, we could in theory do so by marking the smp_ops.play_dead function
pointer as __noreturn, but it would be tricky to teach objtool how to
understand that.
> void native_play_dead(void)
> {
> + if (cpu_feature_enabled(X86_FEATURE_KERNEL_IBRS)) {
> + this_cpu_write(x86_spec_ctrl_current, 0);
> + native_wrmsrl(MSR_IA32_SPEC_CTRL, 0);
> + }
Can update_spec_ctrl() be used instead?
--
Josh
Powered by blists - more mailing lists