[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: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Thu, 25 May 2023 09:03:40 +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=WRynqVwXjJMpUlCc78Xq0TrpPcne2D1ACfj/WSgty70=; b=NEOSaofd+du3nSQXoFN1WfzOHxfwUUEVap+u5TkGMwQX7xF2vXaqiSjyX1btxCns9H90naxbAp1Gck5yxPZbSkmskB30rSSPar+Jjz7ZC0Qs4YDFiOeIA4ce06q/2O1FQ75GRGjls1b6LyouaBHBEBKE+KE5Ro7KxYsn96jrExW/O7AQu91dpFoakZH5nIXvnNb1JDhBNy+fZrGArsfDpr8t1DSZzavrrO5sDSX76xP+1fi3ssV4NHGBE4XiX8BZNiFuRW/WMPxgVf/jZexcM0/0r6+SIRCbYId+8HGmPcmQGpIcNOitzHwF6O8ZX3t8U7rOrGYx/Dw/A0zu5GOzLQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G4mZq7YR3W4BdAuWoYvgQNUF83e4KCuYdldATFgcFhQXxPWsPvn6ZYwcX1aSThku9jp82olSRBymHqYMNHVf81jXT7JQ55d9SKKXXOCckN87LAG8D39AYJnDRcyFH57MeLpIe3DoiqFFQx4ftBXdkAb1AD7KZgDmZJ2eEreC1uitIYAOQ9tYVCG0tKVI8GX9SQV/xoqgPudFxDa6VQ/2Sg0w9YLFeuEL/ihBeQL7LzfAxRsYT4NYoAIr1MmAaKstNifCoyFH1Vz7meuJ0gMwV93pNTeCm6S0hCcjMoV9dcELfQEwe3FN9Nu0xWINnnppLdkgAJ8xYeZ816ktFpnHMA==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Michal Orzel <michal.orzel@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 09:04:08 +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: AQHZjUpY6xFVIVbG80+SN4dEj9SmF69pi9WAgAEmH4CAAAC+AIAAAkSA
  • Thread-topic: [PATCH v7 11/12] xen/arm: add sve property for dom0less domUs

Hi Luca,

> On 25 May 2023, at 10:55, Luca Fancellu <Luca.Fancellu@xxxxxxx> wrote:
> 
> 
> 
>> 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?

Yes

Bertrand

> 
>> 
>> ~Michal





 


Rackspace

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