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

Re: [PATCH v4 02/12] xen/arm: add SVE vector length field to the domain


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Wed, 29 Mar 2023 10:45:45 +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=Eut2csArcCZA5PYPoSV7KJjsImLE6DzQJgIfbnA88ZU=; b=dT3dyMnVRTcPs5XqqtJhpGgdqALAGTaDsz0YNIvxDrHnY0bl/tOHdoutw9ufMLCkbK8tZnMhVbZw4An10Ye+TvA8gsya/MqkMXMk2mh2hyJ52GXe6eMgMDKiUrWYOoWUUEqL9gCuckLYPCDNnW/LkeetUPqbSl5wOc1O8Z1mEl2rLK+u/js3ONHJKgNnZbEi5etQZaAfbevqDuCF7jiP/sdA93N7TFpmcLiyG+O5e+/TbJPaSn4wU2NXXfpEq0qhN0bMejtqXLijkE+0/wZgh9CXRr9qOs6LyY2DYc2aTf2TIYCy1rIo0GSGmEV044Bvgc0UbV8JldkHaBegckyTpA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Br/CDISAFkwpzYktg8J8RRcTugHJ6mSQtGxmzWdXfhUfleTUJqYJXPTiY1XCvn2mHt6cACazskrLvIC5tyvCWsBh4nxuEjwURl7aDd8gsLMep4tmoYKdd2YOJD9LGW/z9Ja8hQL8Wi12q8oYBgUdW7kRlO2qvv3/i34oOQ+ZWFYAflDXN/Az3ta8YifT5wCJb3ycV1o2QgSNHXUWVpjTnU3j7n7Tpz6fSpFs22jHJTgUiNK1pol4iqR8b/4zwifqjEgxrV/iUUiaArbBqtPHNWSyWNUvBm2t17wFrHhGLas4rF4s6es/KV9Nl4nv2qmkKIobMTrjPqsxl2Lzzdr8XA==
  • 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>, Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Wed, 29 Mar 2023 10:46:25 +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: AQHZYJtYhPNp4K3qPECnSSUY8aM6MK8P8D+AgAGZUgCAAAi3gIAAA68A
  • Thread-topic: [PATCH v4 02/12] xen/arm: add SVE vector length field to the domain


> On 29 Mar 2023, at 11:32, Jan Beulich <jbeulich@xxxxxxxx> wrote:
> 
> On 29.03.2023 12:01, Luca Fancellu wrote:
>>> On 28 Mar 2023, at 10:36, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>> Yet another question is whether both range checks (against
>>> SVE_VL_MAX_BITS and zcr_max_bits) are actually necessary / useful.
>>> Iirc 2048 is a hard upper bound, so zcr_max_bits being higher than
>>> that value should likely lead to not using SVE at all (if it doesn't
>>> already; didn't check).
>> 
>> I think the check sve_vl_bits > zcr_max_bits is needed because from 
>> sve_vl_bits = sve_decode_vl(config->arch.sve_vl); I can get values above the
>> maximum supported bits (zcr_max_bits), later on I will use the struct 
>> arch_domain
>> field sve_vl to compute the size of the registers to be saved/restore
>> 
>> Is there something I’ve missed from your comment?
> 
> Hmm, I realize my earlier response may have been ambiguous: I didn't
> mean to question the presence of both checks individually. I merely
> meant to question whether in addition to the zcr_max_bits check you
> really also need the SVE_VL_MAX_BITS one.

Oh ok now I see what you mean, this check

if ( !is_vl_valid(sve_vl_bits) )
{
   dprintk(XENLOG_INFO, "Unsupported SVE vector length (%u)\n”,
   sve_vl_bits);
   return -EINVAL;
}

Can be removed because if ( sve_vl_bits > zcr_max_bits ) is enough,
I agree and so is_vl_valid is not required anymore

> 
> Jan


 


Rackspace

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