[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] x86/amd: Delay amd_init_levelling() until after fixes to the CPUID MSRs


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 21 Jan 2026 11:58:54 +0000
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3VM9xryBx8vMeosmXSUtzaIrbqm5eYskiAubR3TMpDo=; b=YiK0BSzr+zvX1tZwd1G5QZiAAPc5suOLlnfRPCVSkZVLrdomvxI1JfosME+xcH1l7jmkZv1sZZKzGF4iX7VMCWVglyhbg6pJg75Gm+xnZLP3RJXfwIj2m28pXtd56sRV7FNAbjSf8ckb3FgfNveWxif8KPUlaElFl3UC4dFNI3fn8A1YG1c+4VgEMPtXCGIawWlh89C5tIfsbmER/kMVmAR9aV3EyQCZ/XOfmJG209i67yDVuJLTqgsu12SK3ng5JeMvf8L7blgViVoGAUJyRrR9zKQ+AC/DIiCWh5XupFVYfaF/bJ5/qDgLrjzu974KjTlBLYea3NKkKaQMu412Uw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=c5sZM0it/JCjCRqPvJ3UvckDdhYyCAkI5g40gwjM2atRSChqn8IYJALewf7bsK/L3HbgoCt769JWMAb2HgmoiwsvwdMiZOOUiYIPTby2uodIuglqDFN4TAXHxlaoYs29T/VswfU2SlQTBVXaZIHDn8bdcHtiKuKJAj3X0pwwpLxFvxxDPHMutMzOeCVbj/Z4lfN9XjppF6MTYU4b4H0rl+sgfgtSWivOFBV2UzqCINDn0J3RzqVFfuSP43xSVrFh4VB3nxOmIbXBNuQfdNv1GLpdJ4Z1/LoNkWVKuXXj17P+3q/FY3JQIThp2QNTKxxmwYPuydqunvAFcWieW+oSgA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 21 Jan 2026 11:59:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 08/12/2025 9:41 am, Jan Beulich wrote:
> On 02.12.2025 11:57, Andrew Cooper wrote:
>> There's no need for amd_init_levelling() to be specifically early.  In fact,
>> it must be after init_amd() edits the feature MSRs, e.g. enabling TOPOEXT on
>> Fam15h, or we revert the change on the next context switch.
> However, ...
>
>> @@ -1270,10 +1262,14 @@ static void cf_check init_amd(struct cpuinfo_x86 *c)
>>      check_syscfg_dram_mod_en();
>>  
>>      amd_log_freq(c);
>> +
>> +    if (c == &boot_cpu_data)
>> +            amd_init_levelling(); /* After CPUID MSR adjustments. */
>> +
>> +    ctxt_switch_levelling(NULL);
>>  }
> ... this new placement conflicts with the two RDSEED patches which have been
> pending for a while / too long. Even moving up wouldn't help, as the TOPOEXT
> re-enabling is after the switch() that the RDSEED changes are being fit into.
> Surely I could re-base accordingly, but it kind of feels that the older
> changes should go in first, with whatever adjustments necessary done either
> here, or (in a preparatory and agreed upon manner) right there, or entirely
> independently.
>
> Looks like it would be possible to move the TOPOEXT re-enabling ahead of that
> very switch(), for the code above then to be inserted between that and said
> switch().

The NX fixes also need to re-activate a CPUID bit, so I'm going to have
to rework this all differently anyway.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.