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

Re: [PATCH v7 11/12] xen/arm: add sve property for dom0less domUs


  • To: Michal Orzel <michal.orzel@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Thu, 25 May 2023 08:55:22 +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=cWcc9kxYhxm2dPFps10rBh+mKb5CXHjxBQEa56fevtc=; b=Dty+p2yBotySzgNsvtrOmdFl46voYyCarfO0X3Sd0+qrMV2mfw1o+x7z2fhWEzYp31qGBsrf+wr5eM5SK9DPtcdGHvBygFUVCViCwFxFNGeZHwjZHnWjolMyCC/YhETwgu02ULQcum78JgDkjRI9Zct7r+slqKySpPua0ZG45+aN6tPnVtGv4qRLvsNiL9MRQfERtuJWOHgY0bNtwdkWCnahoYDTrXHEmPWsSG06fv0g9u0R8F3laUdlS/pOii5UgcYTVFGc1JkmQhey2LVzqeb0zC7ccdt6uS3XNlgOdKILcuNUHga9DnrAcRD5p80lHcny/VUa/lf1tbScOBtgRw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gXPSMvSUW3sVSGxprKleMrp5YDHd/vNQPHYK9aN04Xz1nqZz/SgqnBCYQsydPcg6ysL7SawnHifArc4LVfH7jglTBmKq2d1q+pmWVqyQwQcKLcWmJAutlJ02MU/OQRNyh+0OxgLfGHJmnH9wRLTjK/eHvNcPwLwiEm6wR4GiNyFHtwUypuA7Iku15c2OIdwvBt21J12DkevxaXkEOPp+lbOYRcPVRw76plRE33cbTv8zvCfBOfkIoTyGScSWgTSeruoDKGyMv9Jw9m9JhjYruYvyi0UPcKeI7O25eURA+L/WUrD9kJi+cRoflBVS4yD/Actv9St4LVUFUj8rdOfDuQ==
  • 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>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Thu, 25 May 2023 08:55:41 +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: AQHZjUpoyjbTsitUikWCGPYyG/Olya9qshGMgAAAlQA=
  • Thread-topic: [PATCH v7 11/12] xen/arm: add sve property for dom0less domUs


> On 25 May 2023, at 09:52, Michal Orzel <michal.orzel@xxxxxxx> wrote:
> 
> Hi Luca,
> 
> Sorry for jumping into this but I just wanted to read the dt binding doc and 
> spotted one thing by accident.
> 
> On 24/05/2023 17:20, Bertrand Marquis wrote:
>> 
>> 
>> Hi Luca,
>> 
>>> On 23 May 2023, at 09:43, Luca Fancellu <Luca.Fancellu@xxxxxxx> wrote:
>>> 
>>> Add a device tree property in the dom0less domU configuration
>>> to enable the guest to use SVE.
>>> 
>>> Update documentation.
>>> 
>>> Signed-off-by: Luca Fancellu <luca.fancellu@xxxxxxx>
>> 
>> Reviewed-by: Bertrand Marquis <bertrand.marquis@xxxxxxx>
> 
> (...)
>>> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
>>> index 9202a96d9c28..ba4fe9e165ee 100644
>>> --- a/xen/arch/arm/domain_build.c
>>> +++ b/xen/arch/arm/domain_build.c
>>> @@ -4008,6 +4008,34 @@ void __init create_domUs(void)
>>>            d_cfg.max_maptrack_frames = val;
>>>        }
>>> 
>>> +        if ( dt_get_property(node, "sve", &val) )
>>> +        {
>>> +#ifdef CONFIG_ARM64_SVE
>>> +            unsigned int sve_vl_bits;
>>> +            bool ret = false;
>>> +
>>> +            if ( !val )
>>> +            {
>>> +                /* Property found with no value, means max HW VL supported 
>>> */
>>> +                ret = sve_domctl_vl_param(-1, &sve_vl_bits);
>>> +            }
>>> +            else
>>> +            {
>>> +                if ( dt_property_read_u32(node, "sve", &val) )
>>> +                    ret = sve_domctl_vl_param(val, &sve_vl_bits);
>>> +                else
>>> +                    panic("Error reading 'sve' property");
> Both here and ...
> 
>>> +            }
>>> +
>>> +            if ( ret )
>>> +                d_cfg.arch.sve_vl = sve_encode_vl(sve_vl_bits);
>>> +            else
>>> +                panic("SVE vector length error\n");
>>> +#else
>>> +            panic("'sve' property found, but CONFIG_ARM64_SVE not 
>>> selected");
> here you are missing \n at the end of string. If you take a look at panic() 
> implementation,
> new line char is not added so in your case it would result in an ugly 
> formatted panic message.

Hi Michal,

Thank you for pointing that out! Indeed there might be some issues, I will fix 
in the next push.

@Bertrand, can I retain your R-by with this fix?

> 
> ~Michal




 


Rackspace

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