[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: Jan Beulich <jbeulich@xxxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Wed, 29 Mar 2023 14:33:30 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.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=tkx2eg6gYLHAn1XB40x+OvCOhM+/Td4YWhdLWp5eA/0=; b=RbeGE0z/w7jfIyqBeVMG3SK2o5TvpEPWH2ZP1v6LzlZF9JYB6DYdMVRZ8+urBqfnG1PDvQC9T6Fin5brsY0FkeEqa75V1AMWS8wN322D6MqCy6CdL+ZDIJrrmMbMp3/qtX3BKxnsR2lmQTf+Iy11SxY5V7u+9KE6TQzfis32pPQjtwY8k0FZucor09TRwzsCDAZ6F1jTPcTD9l9QuzqOMlHsP9mz4wWbzhzDzdQ2KTY3MFaJ9zsoSiCQ848Z6CUoO6wP62jpTa5H6f5FSF55L8Vc4f5tWMdK+NnuwztoP7q1m0qphGmNC2IsGtjWQujGd2xcqI6etyhdPMwE8wAesA==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MbUL3aVKdOfp+ukNNFNgIfJ6haWQZyDMH1IH+F68kMWEp2n3RKkJ2NQ0tp6EDsJczTLA7ilhzERajnyPqgNm7Xfq8aypCUk8fig7VpaiDu2gKqWnyjgBq7skYp4u1/lpZguRvZH0rvS+RneRuM+HwWATzKWSD256+oDI05km5tgN/zTji/zEyd8VvuQIODhf4s86+1XB97X9Vr0qst6FAMQMXlD8Ir5w6FQ1qF1GrQ0U2rY7C8LAJYhwvxeiqRkQBskG5oTgub58jiOMC7zRV3TctEQsQfuLnn+2d2kLgGp88dJmNNIoa8hey0MGeoScu5wSpCAq3VljFIl7xf29xA==
- Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.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 14:34:09 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
- Thread-index: AQHZYJtnVirGlcet3UaNyqwRESxZda8P+VUAgAGzKoCAAAUrgIAAI/AA
- Thread-topic: [PATCH v4 07/12] xen: enable Dom0 to use SVE feature
> On 29 Mar 2023, at 13:24, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> 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).
Thank you, I didn’t know the existence of no_config_param(), I’ve had a look on
the
approach, for example in static int __init cf_check parse_cet(const char *s),
and I’ll do
something similar
>
> Jan
|