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

Re: [PATCH] x86/cpuid: Introduce dom0-cpuid command line option


  • To: Andrew Cooper <amc96@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 16 Dec 2021 09:20:13 +0100
  • 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=kNvgtSniZ8bZ4mekxxI8cWsVmTiwNR4T/2Sb4VG8PR0=; b=NiKcAAihE3V3Gnxra4jK4unYvb4nkwYoyZfcDMx8kDkBkBa8ABo48AH2fef5WUaPK9KZGzVmuNdglqnPgKwTtVy3PeE1pxgyw1FieT+KPm4ucazqOsX+V9T+z0Zax8JKKQg4JTXSsNpsxGUkaTxIMcD0Lb39jnm914C3rEejjxoETcYO3so7H/LNDY99NSN3x2q2bfjUTPJlhmAVuTjn6fhefDxdxIt1sskTmnTsW6gmzgY+oThJ+usHDq9dDtuj3b1XmVDzzNFFbZglQCeTdn9iU6hiBuhtMeMUnmCR+xQ3SBoVgasJSSlC9yjUllk9ukZ7jfDmphqyYqSnEw1dDw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gsCUup+yD186z3q+v1jJtFgv8bmTd+5e8qUrHlgo97zPrPtbj64lWS9lUpbWESn9kYKAwPq5kLzWWtYZDdC9r1K7pImEbIXf0qGUraxpmYEzARLKiLlxjkqeORQ5M+I9VljLZ37TORXznbJlDPlcKP315GL3zSFtSSE7dNmathqYphqcT0jmc2PxbAVGMykRVXDPNagJ29v3Xv5FKHgzdQYsTNgK1SCUwYqzA6xpvFFgGuV9WJFGl9lFS2zrdFrl3SHcsBjIUNQ24O44/CXmPtyOfvk7zyst0zYdl21Y/E2buMcm0wGTbQLZu3HtcYgNMSnD9EPp8Z4eP9yTZfgywQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Daniel Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 16 Dec 2021 08:20:57 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 15.12.2021 13:13, Andrew Cooper wrote:
> On 15/12/2021 08:34, Jan Beulich wrote:
>> On 14.12.2021 22:16, Andrew Cooper wrote:
>>> RFC, because I think we've got a preexisting error with late hwdom here.  We
>>> really should not be cobbering a late hwdom's settings (which were provided 
>>> in
>>> the usual way by the toolstack in dom0).
>> For ITSC I think also covering late hwdom is at least acceptable. For the
>> speculation controls I'm less certain (but as per the comment there they're
>> temporary only anyway), and I agree the command line option here should
>> strictly only apply to Dom0 (or else, as a minor aspect, the option also
>> would better be named "hwdom-cpuid=").
>>
>>> Furthermore, the distinction gets more murky in a hyperlaunch future where
>>> multiple domains may be constructed by Xen, and there is reason to expect 
>>> that
>>> a full toolstack-like configuration is made available for them.
>> Like above, anything created via the toolstack interfaces should use the
>> toolstack controls. If there was something dom0less-like on x86, domains
>> created that way (without toolstack involvement) would instead want to
>> have another way of controlling their CPUID settings.
>>
>>> One option might be to remove the special case from 
>>> init_domain_cpuid_policy()
>>> and instead make a call into the cpuid code from create_dom0().  It would 
>>> have
>>> to be placed between domain_create() and alloc_dom0_vcpu0() for dynamic 
>>> sizing
>>> of the FPU block to work.  Thoughts?
>> As said above, I think the ITSC special case could stay. But apart from
>> this I agree.
> 
> So I disagree with keeping the ITSC special case.
> 
> I do agree that a non-dom0 hwdom probably wants ITSC, but ITSC
> explicitly can be controlled by the toolstack, and therefore Xen should
> not be overriding the toolstack's decision.

Well, fair enough as long as there actually is a tool stack side equivalent
of this.

>>> --- a/docs/misc/xen-command-line.pandoc
>>> +++ b/docs/misc/xen-command-line.pandoc
>>> @@ -801,6 +801,22 @@ Controls for how dom0 is constructed on x86 systems.
>>>  
>>>      If using this option is necessary to fix an issue, please report a bug.
>>>  
>>> +### dom0-cpuid
>>> +    = List of comma separated booleans
>>> +
>>> +    Applicability: x86
>>> +
>>> +This option allows for fine tuning of the facilities dom0 will use, after
>>> +accounting for hardware capabilities and Xen settings as enumerated via 
>>> CPUID.
>>> +
>>> +Options are accepted in positive and negative form, to enable or disable
>>> +specific features.  All selections via this mechanism are subject to normal
>>> +CPU Policy safety logic.
>>> +
>>> +This option is intended for developers to opt dom0 into non-default 
>>> features,
>>> +and is not intended for use in production circumstances.  If using this 
>>> option
>>> +is necessary to fix an issue, please report a bug.
>> You may want to state explicitly that disables take priority over enables,
>> as per the present implementation. Personally I would find it better if the
>> item specified last took effect. This is, as mentioned in other contexts,
>> so one can override earlier settings (e.g. in a xen.cfg file used with
>> xen.efi) by simply appending to the command line.
> 
> Order of enabled/disabled I feel is an implementation detail.  Perhaps
> what to put in the docs is that specifying both forms is unsupported,
> but "this is for developers only" is already a fairly big hint.
> 
> The only way to make a latest-takes-priority scheme work is to use
> string_param() (creating an arbitrary upper bound limit), and parsing
> the list during dom0 construction.

Why? Simply accompany __set_bit() by a __clear_bit() accessing the
opposite array.

Jan




 


Rackspace

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