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

Re: [PATCH v4 07/12] xen: enable Dom0 to use SVE feature


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Wed, 29 Mar 2023 14:24:43 +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=dyYg3i6dNg+T7AwsZ7nfIl4RxewkaT43X+v0JHlgckk=; b=Ix1c8EWhpTV92aVhyql/WbkaTKL7Pbm2shDSDE6wCTT8KV7hmJpXOLqBKng025Kqt/9ZuONFAXVQgx/m3mD5zayfM0XCN71MDgTq55kAa9NU0vMFu4ZM9vbGvZfm/cXAXfRy5lusSiIg/NpGO7HM51Yg02GAhdBY8nzWKTeGAGZ09QobY121Eg0/ToWfD+NDVcsslETo01vAIg7XFW0gaAvruMhNIrdF5gdUqNRStDM/bkEs61W2E1LjUJkAKQLJTcUaPO5UIn8Cl1fLXkbIIIt2tb9ndV5i73clr6AAApDhK4WRo4rzBKQJV+Lki5tGaIh89V8Ym4Y4y+MNEmbOfw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K/1RzJqoJvrMbDUato9JW20HWqlwiIu1cBV2F6DB8RrfMjYAIbSdlpjNPC+E0lXotTz2lD53XuJ+DjTy8IRV1xogpLs3RclgkNfBwdnydyjtsHkwpL492pFjamwgpiAGcylFXfoNB8rjbsMWCPpnfbrBB46jbEN5zLRXK/pjCrvV+W7IO52xcUL4YU9Ed7Xd9rWFnx7fjvc+VC63IIJqZHrQb0ivM5Kt5iLP5OMcGxGVzModEe5OQ+c35/HanIZriyKwg1guePrZeKdMyx9J2JtQIvhvIBPdl3xzhpktDQ/5ZnbTi6GaMTmPVtTvysKzJpCx32pMFnkBAANI9UgCRQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 29 Mar 2023 12:24:59 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 29.03.2023 14:06, Luca Fancellu wrote:
>>> @@ -61,7 +62,12 @@ custom_param("dom0_mem", parse_dom0_mem);
>>>
>>> int __init parse_arch_dom0_param(const char *str_begin, const char *str_end)
>>> {
>>> -    return -1;
>>> +    int rc = 0;
>>> +
>>> +    if ( sve_parse_dom0_param(str_begin, str_end) < 0 )
>>> +        rc = -EINVAL;
>>
>> ... can't you call parse_integer() right here? opt_dom0_sve isn't static,
>> so ought to be accessible here (provided the necessary header was included).
>>
> 
> Oh ok now I’ve seen why I’m doing this, because ops_dom0_sve is compiled only
> when CONFIG_ARM64_SVE is enabled, so I’m using sve_parse_dom0_param()
> that returns negative if that option is not enabled.
> 
> Otherwise I should declare ops_dom0_sve anyway, but I should not accept user
> customization of it if the option is not enabled.
> 
> So I thought the use of sve_parse_dom0_param() was the best way to handle that

Maybe. But please also pay attention to the existence of no_config_param()
(as in: consider using it here, which would require the code to live outside
of sve.c).

Jan



 


Rackspace

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