[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: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Michal Orzel <michal.orzel@xxxxxxx>
  • Date: Thu, 25 May 2023 10:52:43 +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=/OyPcgKZoFP8YKYHn+5Au+VhrdJACiIX6cyKBpe3eDc=; b=O1yjYBZASixDvI/iS36UpC0O1mRGYmnR6GshlLj3Zy0KjYLzvDKIiDB2BECwFIQTUN5Nv4dcYJwUyGK7Tf9D3g1KX/PFD7MvtWZ30RM19EsHvuFEjJmV0oJTOqGho0QzZgNf2wUph1IIY8gDNOYudUW9IwjhfHeSToiZb27FGrkR2/0gC1jsfi64B6Ehuv1oP3bmBUAlOuw2JYMLWxozR21d1MJMZ/oIaApnlyTwMvWdwo9rSO5Raj8EiQMuq5zp60e0BmQts+iEQWVGBQw+KJ67KeSlSzpYK74bXChWqAqyYYq+nvzq5E6AWKhv00Fh6AT+ENB7eJla0CquoKhLHQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZnQaQTk26mH33VBGktPes/YsmpC9umrQSM4M545Lac4YOVpjhF5jH3DFuiO0SSSgzF4Eve0J2MZnDkMOaZ/NQlr4SgbbGPWKLWQ2qMg6WTFqdRo1xMGgDdixZmEEbnk4j5UIN/vW6yN2rpXYlbbAFeP864OP1LB7BqoL7ADJhan3CbYM3wxQge27WGej2FcY7/m8F8EhI/C3ihjV1fXH6rjf+QC7U0L3FHq9zgpc8VG3MYidwFkuQALSBwrMKpSW4ZqkW5dc3CRCnuSiGgWpDNAKktd1O6WETS8oHW7XOFx3my1jYbtP2ale6pAwgnedPxzQ0ETTAz+xLw3RoaMoeQ==
  • Cc: 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:53:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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.

~Michal



 


Rackspace

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