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

Re: [PATCH v2 1/3] x86: Add AMD's CpuidUserDis bit definitions


  • To: Alejandro Vallejo <alejandro.vallejo@xxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 11 May 2023 12:46:32 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=CQ5tf7CFaSVWbnEx0H8pjapDEkk0kRg2kbkOZf7M6Q8=; b=iHI/I1u0mlmdG4oRHFSKgJe4FKbxvziYenh0tOpfQ4vU1OqZYsjFx25sNZ+vJu2sxPa6+BGXcEnmngmX6pyYEnkocMZxX9I6gmEqwNAV9l5b24ws0TjufUX8u5r899fJeDR1z8FIxLGL9rAU10fF7KLBCWVu6RRyV0qhlQLIJf295D2u0juGaV+0HZWWM1nzAvANyqi5hwjmidHvMfH/30QelGA9RKzYGrtydA/wNUVQBtBBx5NrHrtCdK+WxigzCk4+FVKIz4XITwhGIHAF/d9xHQmVwHhTw93hOOj5a1fA7OIdogTO6RzaDCNWn1cfVdEoOrJGrVvSVi/IsWjCEw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gNuysS6SdNsN77+YMh/rkxqDQml3LA2NxlUaIbwdJyh4udHOckciqYNziL80DEUrGsEsiWyxD6GOH2CcWgK+BPJ14F3OCxx+YVbljZS1E6hlxy6UlSQSRxzmTORNEV/gTu7gpnjcze0YKgjJrS3bYHTsWRg+FEijJzjGaco2bLBKrGaTUMPVbgPm4SVqlawXhWTnet3JkDbgs+w9qWeuOj9vV13FcmGEn3eAJkqzEBYkLzxSyJ6DA0bxD6lMKIL1tnBtJ9EALdVoS8ceUocClKZ97ON/ExUr6z2Q9lbX+n/xM3DuUb7k+oQ8x7jBoJW94hDksvSDf1GvNI319Grctw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Wei Liu <wl@xxxxxxx>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 11 May 2023 10:46:39 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.05.2023 12:38, Alejandro Vallejo wrote:
> On Thu, May 11, 2023 at 11:41:13AM +0200, Jan Beulich wrote:
>> On 09.05.2023 18:43, Alejandro Vallejo wrote:
>>> --- a/xen/include/public/arch-x86/cpufeatureset.h
>>> +++ b/xen/include/public/arch-x86/cpufeatureset.h
>>> @@ -287,6 +287,7 @@ XEN_CPUFEATURE(AVX_IFMA,     10*32+23) /*A  AVX-IFMA 
>>> Instructions */
>>>  /* AMD-defined CPU features, CPUID level 0x80000021.eax, word 11 */
>>>  XEN_CPUFEATURE(LFENCE_DISPATCH,    11*32+ 2) /*A  LFENCE always 
>>> serializing */
>>>  XEN_CPUFEATURE(NSCB,               11*32+ 6) /*A  Null Selector Clears 
>>> Base (and limit too) */
>>> +XEN_CPUFEATURE(CPUID_USER_DIS,     11*32+17) /*   CPUID disable for 
>>> non-privileged software */
>>
>> While I can accept your argument towards staying close to AMD's doc
>> with the name, I'd really like to ask that the comment then be
>> disambiguated: "non-privileged" is more likely mean CPL=3 than all
>> of CPL>0. Since "not fully privileged" is getting a little long,
>> maybe indeed say "CPL > 0 software"? [...]
> 
> Fair point. That was copied from AMD's PM, but there's no good reason to
> keep it that way. I'll modify it as you pointed out.
> 
>> I would then offer you my R-b,
>> if only I could find proof of the HWCR bit being bit 35. The PM
>> mentions it only by name, and the PPRs I've checked all have it
>> marked reserved.
> 
> It is in the Vol2 of the PM. Section 3.2.10 on the HWCR. I'm looking at
> revision 4.06, from January 2023.

Oh, my fault then: It didn't even occur to me to check Vol 2, as normally
it's the other way around: Only the PPRs can be sufficiently relied upon
to be at least halfway complete.

With the comment adjustment (which I'd also be okay to do while committing)
then
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

Jan



 


Rackspace

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