[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 12:06:24 +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=toKGm4MY+gkhQ5b7dRlY1UGapjFnpTS2B+KA2nvdseg=; b=Mw+w8sf+rNRJ4HYaMH7tZ9zrTztk7bZ6KK9OvBO1k1YjzlOuHsKlSaIXumAF+7owwBLQ01BbY64XWcDhKvS3lbePuA6jD2thjVgrRuEweU7FJsZ3XtVMdzlrwQvIxxcTiNV8Tf+XsU/EDhA+asBEwRct1kBGhlJBVdAHQe8XIIQG744MPwQ5eop174cGAlRHSsumsCo40WUEeyvwFdLzBK9ja53FhaeBokWDAAYuusdVeVXN1LN1B/noNHfMZsFU64YAfNQybMuOWWllkqmMv1+hZn294LvVDO1SeFf3k7DKD/TSHaamCZ3P9L81zvIxwDEVKDuGQm70HCDNz44ELQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NmQ/t7QvudEfD7pi3/YeIqqHucsmkQbI9Jy9rn1Lv+umKfaVOwjkUwaNJvbXN/8CPvia0K4mpmlvz7jptxnLWzxtNmO8FnfPaVau8h5uEhDp/b67k/aWY1rgC3xPyzybCrwOfI1Lop3UKGvVVn9caqChTwGGulVoX8mr5kkR+BNT//ZYa5ec9M24DmsVdpQyJMZov6E/AXhBl/VPuzHt23b2JXZewCKYU/Cm/7dLBJjcVuZGgRycg9WghCD4kolcCDXQu00Qkv3iWnqj+mUNtaBC6gCfYB5X01OJjF1E5n9Xl1tsZdtEeyfEznd7oLtWoNytYHUZe9mceg6TbgEJ/Q==
  • 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 12:06:59 +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+VUAgAGzKoA=
  • Thread-topic: [PATCH v4 07/12] xen: enable Dom0 to use SVE feature

> 
>> @@ -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




 


Rackspace

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