Re: [PATCH v9 2/7] x86/hygon: Map CPU NodeIds to DF nodes
From: Lin Wang
Date: Fri Nov 13 2026 - 03:01:37 EST
Hi Boris,
On 11/13/2026 12:43 PM, Borislav Petkov wrote:
On Thu, Oct 29, 2026 at 01:33:08PM +0800, Lin Wang wrote:^^^^^^^^^^^^
+static int __maybe_unused cpu_to_df_node(unsigned int cpu)That cpu and nr_cpu_ids mean nothing in a guest so I'm thinking you wanna test
+{
+ if (cpu >= nr_cpu_ids)
hypervisor first...
+ return -EINVAL;
+
+ /*
+ * The NodeId reported by CPUID in a guest may not describe the
+ * physical DF topology.
+ */
+ if (cpu_feature_enabled(X86_FEATURE_HYPERVISOR))
I'll move the hypervisor check before the CPU index check.
Thanks,
Lin