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

Re: [PATCH 1/3] x86/amd: Use setup_force_cpu_cap() for BTC_NO


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • Date: Wed, 26 Nov 2025 16:33: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=bLfKCpG4/xw1gThi9mjBpYROA4/JDXaMtxiJFo6uvUk=; b=FJU17opMwNJ9IdExFHgQqZqsdOK0J9ZBk18AmNE5oeaSAA0Ecq4mB8rvAs8/AzcNoeRuleGfhSMe+A05bfZOka1k3s/82BSHMNWS1iDvFP30dbutWqECu3QU7wt4yu4G2q+ohY+xVpG94UxjRFGyuK7k8MUomypHcGgZeKMpT1shxAUyfGKeewXRO2AVXYq0enLF9QN0cW/XZz2+KD03xxaTRL2GPreNzNJS6bYn0y4+xJD41zBO9qSFaErbKpYMJQf1e47Yclo/wqCMF/LqLiIJC9MIUK9WCT2/wUqdeZXHHe1t1Kf39wqh4zhxp+scY8sgO/TUa68cbArC/ZQjlw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ZkT1fXGR3OfZS927NyRCswK6b4Y4gWxnehzQaJ6VOxQu/H+Yl+2ram1G0pwbDle2Nax2KUlNrdxXcpdJX5PqtuL+yFkm1wnBV7dZixDIDlE3aNwQ3F5Z8P1hYZtcCzgtBlEBviV/+77AXGzC4jovzpnggXMAgxENCyNuCrtVtCpeqoQ3INdAArJI3u3YvCAFmK/7aTUxFSlSwC/9StES7OrED7ZcoN/pjU+Pip1cX/CMoPuMJw53ZeV/i/wtMnfm5Z7uonCOhlXA8DXHMU8r13YGqo2Z62mTLTM8K9ZIvtw5Cem2LI5peVR+0rYwhTiJCorfofYMhTJzpD5NGXhQ/Q==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
  • Cc: andrew.cooper3@xxxxxxxxxx, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 26 Nov 2025 16:34:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 26/11/2025 3:25 pm, Jan Beulich wrote:
> On 26.11.2025 16:12, Andrew Cooper wrote:
>> On 26/11/2025 2:19 pm, Jan Beulich wrote:
>>> On 26.11.2025 14:22, Andrew Cooper wrote:
>>>> When re-scanning features,
>>> What exactly do you mean with this, outside of XenServer (i.e. upstream)? 
>>> The
>>> only thing I can think of is recheck_cpu_features(), which calls 
>>> identify_cpu()
>>> and hence init_amd(). Thus ...
>>>
>>>> forced caps are taken into account but unforced
>>>> such as this are not.  This causes BTC_NO to go missing, and for the 
>>>> system to
>>>> appear to have lost features.
>>> ... I don't really follow where features might be lost.
>> Well - it's a feature that we started upstreaming and I still hope to
>> finish in some copious free time.
>>
>> Already upstream, we rescan the Raw CPU policy after microcode load. 
>> That has had fixes such as dis-engaging CPUID Masking/Overriding so the
>> Raw policy comes out accurate.
> Yet that doesn't take forced features into account afaics. So at the very
> least this needs to come with a description which more accurately describes
> what (if anything) is actually being fixed / altered upstream.

I don't know what more you want me to say.  It's not a problem per say
in upstream, but it does come about because BTC_NO is handled
inconsistently to the other FOO_NO bits.

recheck_cpu_features() papers over the issue by re-invoking
identify_cpu().  It's necessary for S3 resume because all of
init_$VENDOR() really is needed, but it looks bogus in
smp_store_cpu_info() because it's repeating work done immediately prior
in start_secondary().

~Andrew



 


Rackspace

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