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

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


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 18 Apr 2023 13:21:31 +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=H+Jl7JSPnutaULJ58g5w7OynAPuCNtNpSrzK8J4VLJo=; b=JtoWJLd/fndbGibM3/PVNi+Btb6yODuARo0j1cCACCQqixJu0SeZFF9bFZSEjTGozGY5YqGVWp78vx5wrSJHT8icb10gxk8twZgpL/uq6j3ZRN0oUS9PjEhFxd6vPn5++2z7QFArYb6Ilt6IGFPIAJBNFkt+dXJxB4G+XGwiyXQXU2Gy7Enyd8HvwpuiLITNICiezaoTMKAL6nmfnU7HtRpXuhpbXqeQjymlipNmO2bP6G7PefCWQ4LFAMpM18T+sFDX3UsSSX4DYYqOFvTzlrCQ7Y+uh+Hl63r2+p9mJjKqO3tV/cd6Q3TNh0pkSWz6vFHa4EaBwKBbtCcGYAvKvg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DwkQXWeCYeKtxw0C77FsKeqGT9WX9hX0Ebpsm+o13/U3zNJX6US20kUIZO2QbIGlcw+PQPwQ81ANNvTmZeHPnouBBPQnFHrSXVZnjAhr3zNdOcfPO+WLcLaZQCBA00CC+wqhrq0nbyU+K4FnfYDe0DFAQLT8nhHACMQ72D2JbyOe5yWduM4DzOz+kU/1eAFoBvcBBLONnM1CKkfud1DTnjMHDFzQZxRwlhYqoeHzDKXC+mrdvt0d2Soyi7ZpjlI8lY7ok+Wd6YCwW1+PyRHDrGHw+f+6zD8RkpXtisCZzXEQCQckJAaXQcnoGOFDK0eJ4jvp2tzx20OjN4v8Mc0TZQ==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • 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: Tue, 18 Apr 2023 13:21:56 +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: AQHZbSQwrRQ9/UblkkiINOEljpHZc68xD8SAgAAHRwA=
  • Thread-topic: [PATCH v5 11/12] xen/arm: add sve property for dom0less domUs

Hi,

> On 18 Apr 2023, at 14:55, Bertrand Marquis <Bertrand.Marquis@xxxxxxx> wrote:
> 
> Hi Luca,
> 
>> On 12 Apr 2023, at 11:49, 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>

In fact the doc needs fixing as the domain creation does not fail.
@Luca thanks for mentioning that to me

So please fix that and you can keep my R-b (unless some changes are
needed after the discussion on parameter handling).

Cheers
Bertrand

> 
> Cheers
> Bertrand
> 
>> ---
>> Changes from v4:
>> - Now it is possible to specify the property "sve" for dom0less
>>  device tree node without any value, that means the platform
>>  supported VL will be used.
>> Changes from v3:
>> - Now domainconfig_encode_vl is named sve_encode_vl
>> Changes from v2:
>> - xen_domctl_createdomain field name has changed into sve_vl
>>  and its value is the VL/128, use domainconfig_encode_vl
>>  to encode a plain VL in bits.
>> Changes from v1:
>> - No changes
>> Changes from RFC:
>> - Changed documentation
>> ---
>> docs/misc/arm/device-tree/booting.txt | 11 +++++++++++
>> xen/arch/arm/domain_build.c           | 24 ++++++++++++++++++++++++
>> 2 files changed, 35 insertions(+)
>> 
>> diff --git a/docs/misc/arm/device-tree/booting.txt 
>> b/docs/misc/arm/device-tree/booting.txt
>> index 3879340b5e0a..f9d2ecdda48a 100644
>> --- a/docs/misc/arm/device-tree/booting.txt
>> +++ b/docs/misc/arm/device-tree/booting.txt
>> @@ -193,6 +193,17 @@ with the following properties:
>>    Optional. Handle to a xen,cpupool device tree node that identifies the
>>    cpupool where the guest will be started at boot.
>> 
>> +- sve
>> +
>> +    Optional. A number that, when above 0, enables SVE for this guest and 
>> sets
>> +    its maximum SVE vector length. The default value is 0, that means this
>> +    guest is not allowed to use SVE, the maximum value allowed is 2048, any
>> +    other value must be multiple of 128.
>> +    Please note that if the platform supports a lower value of bits, then 
>> the
>> +    domain creation will fail.
>> +    Specifying this property with no value, means that the SVE vector length
>> +    will be set equal to the maximum vector length supported by the 
>> platform.
>> +
>> - xen,enhanced
>> 
>>    A string property. Possible property values are:
>> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
>> index 3f30ef5c37b6..c1f0d1d78431 100644
>> --- a/xen/arch/arm/domain_build.c
>> +++ b/xen/arch/arm/domain_build.c
>> @@ -4004,6 +4004,30 @@ void __init create_domUs(void)
>>            d_cfg.max_maptrack_frames = val;
>>        }
>> 
>> +        if ( dt_get_property(node, "sve", &val) )
>> +        {
>> +            unsigned int sve_vl_bits;
>> +
>> +            if ( !val )
>> +            {
>> +                /* Property found with no value, means max HW VL supported 
>> */
>> +                rc = sve_sanitize_vl_param(-1, &sve_vl_bits);
>> +            }
>> +            else
>> +            {
>> +                if ( dt_property_read_u32(node, "sve", &val) )
>> +                    rc = sve_sanitize_vl_param(val, &sve_vl_bits);
>> +                else
>> +                    panic("Error reading 'sve' property");
>> +            }
>> +
>> +            if ( !rc )
>> +                d_cfg.arch.sve_vl = sve_encode_vl(sve_vl_bits);
>> +            else
>> +                printk(XENLOG_WARNING
>> +                       "SVE vector length error, disable feature for 
>> Dom0less DomU\n");
>> +        }
>> +
>>        /*
>>         * The variable max_init_domid is initialized with zero, so here it's
>>         * very important to use the pre-increment operator to call
>> -- 
>> 2.34.1
>> 
> 
> 




 


Rackspace

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