[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: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 25 May 2023 11:03:53 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=arm.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); 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=dBOZ3LCuYza8qg/qQVvD0R+nUvbF8irFn4EYuZyKHsg=; b=XE94DOJG0pyDj005o9c5xVcKf82Plg+MelB6A/yjAUD3W/vdjDB6UGwGcagnuLHGh5fJVvtdnBZXz7+i60ZujW+joX192ggMnvr8k8vPzHhwhkC8TpmbAxXuy12MlL7tHQGvgFMllRd3JZ81p9HHJkp8GpU1+ztVKSzX2Y1DAdWdOzqkG5Oblyf1vfKivVrdyLfso+EqBLUdd2eXOs1Lo/Ms8WpjsA9awRFzZI/kxiAux8epDWrYBjP4Hv6eVqS+RUtDmSAmLzYmdaCRbRKQPpcodlraEabnNHCtOk6dhfJDG0svXaEjGmkHuiZX2ltILhhNKon69vExCRWN2EuoCw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UycS6/KMFi9OkibPv8oMrbvHIRIo+og8qOwQpfwGwBMA3BHFNKoNIaasmx32iErv6ayizKp8XU2BDtFqWI53MrNX7kyAfgA/NHCztr5tPi6mzjiTGveMZb/46Krh6iCknN8BAIm7jO9x4ChN9WinBY22DnVfoQcegKYb+Em/tFz6dCnezFTvkPj7FaQWiA/2bTpxIuTgm1yPsgGQSwzYocjJA6+4cOcd2bZ9OpWf5HSz8MVC96sGU0VNeIKBpn7GFXCSGwsFZP5HZWoh1a3RT+ruA04DsY1VXivIRX/jQojYC05NMgzAHvQ+AEABvgrZnfanfrPzTtZJrHhWpVVWcA==
  • 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 09:04:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


On 25/05/2023 10:55, Luca Fancellu 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.
With that fixed,
Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>

~Michal




 


Rackspace

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