Re: [GIT PULL] x86/core changes for v6.9

From: Borislav Petkov
Date: Mon Mar 11 2024 - 10:33:51 EST


On Mon, Mar 11, 2024 at 02:48:20PM +0100, Ingo Molnar wrote:
> The conflict is contextual only, it's fine to put the new __warn_thunk line
> anywhere in entry.S, as long as it's outside the other section blocks.
> Putting it last in the file is the most straightforward resolution.

..and if you encounter another merge conflict in
arch/x86/kernel/process.c, here's how a resolve should look like:

diff --cc arch/x86/kernel/process.c
index 6121c2b42ecf,f0166b31a803..b8441147eb5e
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@@ -933,19 -909,19 +909,19 @@@ static __cpuidle void mwait_idle(void
__current_clr_polling();
}

- void select_idle_routine(const struct cpuinfo_x86 *c)
+ void __init select_idle_routine(void)
{
- #ifdef CONFIG_SMP
- if (boot_option_idle_override == IDLE_POLL && __max_threads_per_core > 1)
- pr_warn_once("WARNING: polling idle and HT enabled, performance may degrade\n");
- #endif
- if (x86_idle_set() || boot_option_idle_override == IDLE_POLL)
+ if (boot_option_idle_override == IDLE_POLL) {
- if (IS_ENABLED(CONFIG_SMP) && smp_num_siblings > 1)
++ if (IS_ENABLED(CONFIG_SMP) && __max_threads_per_core > 1)
+ pr_warn_once("WARNING: polling idle and HT enabled, performance may degrade\n");
+ return;
+ }
+
+ /* Required to guard against xen_set_default_idle() */
+ if (x86_idle_set())
return;

- if (boot_cpu_has_bug(X86_BUG_AMD_E400)) {
- pr_info("using AMD E400 aware idle routine\n");
- static_call_update(x86_idle, amd_e400_idle);
- } else if (prefer_mwait_c1_over_halt(c)) {
+ if (prefer_mwait_c1_over_halt()) {
pr_info("using mwait in idle threads\n");
static_call_update(x86_idle, mwait_idle);
} else if (cpu_feature_enabled(X86_FEATURE_TDX_GUEST)) {

---

Thx.

--
Regards/Gruss,
Boris.

https://people.kernel.org/tglx/notes-about-netiquette