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

Re: [PATCH 07/10] xen/physinfo: add arm SVE arch capability and vector length


  • To: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 13 Feb 2023 09:36:55 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=wHgOL/5PiMClizKFsipE6Yy9FpulTtf5ZXXjt5l6f1A=; b=bqs20xim/dugxTmAi5EB/SuR66EILGbaA9YryjL6wom1BqbCiVfNX58tQe0eF+O2/lz5N4r+XtQ9sgNvL2l910OJ//gngXxOpxLfNgPrxxduGiOPWFcPFPc5yo9H9xADpxIV8Lfxpws1NwVVUlRAeviH7f5MQyv9hws+uoFBbnrQBAiU0t7x/dAYjpI1X6lysa3Q//rtzXwGsU8aEuTn9IL1gPscqCN+hgPdWhV3IqspkJy/iSvmOLLCSCpgx8nPSK3F9hTV4yQElxHyQdHFqwwNB8HNXpxJL3ealt1hdUr/viYCwE1Bc+mvQSUdhWVXRYFcCrYg3DdkA7HCLY+M/w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iA7rLSeNHaEmJHvHkG9Ky7XzO1ZAKSVhVrGD9L7tUGRc5iifP2tupaWFkX1N4lu1DbUyhML8ayCpEO2TKUL7Wc+150GWX1rtdZ/8xRWBnud+5h1yi52pY2Kmm/vHMnfHLKYR9/1e6+ZDcBE6iUfNezaN/6CFIVmR7A9wXpThNCiZZlz0yzfjxRrTyoa8l27unvpKWgkxsseWfGNZuvz9vFdsLuf0Il1ycEiYelR6PImDrYkassLHcXJuQsNpa1PcApAbiVCfEkNSnxU9pNUjiYXUk1C8dDf99vulKmCJT2xzkALmlmbnFBahZ8byx6CmD5si6dDfdUl4n8BzUJNWLQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.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: Mon, 13 Feb 2023 08:37:16 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 10.02.2023 16:54, Luca Fancellu wrote:
>> On 2 Feb 2023, at 12:05, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>> On 02.02.2023 12:08, Luca Fancellu wrote:
>>> (is hw_cap only for x86?)
>>
>> I suppose it is, but I also expect it would better go away than be moved.
>> It doesn't hold a complete set of information, and it has been superseded.
>>
>> Question is (and I think I did raise this before, perhaps in different
>> context) whether Arm wouldn't want to follow x86 in how hardware as well
>> as hypervisor derived / used ones are exposed to the tool stack
>> (XEN_SYSCTL_get_cpu_featureset). I guess there's nothing really precluding
>> that data to consist of more than just boolean fields.
> 
> Yes I guess that infrastructure could work, however I don’t have the 
> bandwidth to
> put it in place at the moment, so I would like the Arm maintainers to give me 
> a
> suggestion on how I can expose the vector length to XL if putting its value 
> here
> needs to be avoided

Since you've got a reply from Andrew boiling down to the same suggestion
(or should I even say request), I guess it wants seriously considering
to introduce abstract base infrastructure first. As Andrew says, time not
invested now will very likely mean yet more time to be invested later.

>>> --- a/xen/include/public/sysctl.h
>>> +++ b/xen/include/public/sysctl.h
>>> @@ -18,7 +18,7 @@
>>> #include "domctl.h"
>>> #include "physdev.h"
>>>
>>> -#define XEN_SYSCTL_INTERFACE_VERSION 0x00000015
>>> +#define XEN_SYSCTL_INTERFACE_VERSION 0x00000016
>>
>> Why? You ...
>>
>>> @@ -104,7 +110,8 @@ struct xen_sysctl_physinfo {
>>>     uint32_t cpu_khz;
>>>     uint32_t capabilities;/* XEN_SYSCTL_PHYSCAP_??? */
>>>     uint32_t arch_capabilities;/* XEN_SYSCTL_PHYSCAP_{X86,ARM,...}_??? */
>>> -    uint32_t pad;
>>> +    uint16_t arm_sve_vl_bits;
>>> +    uint16_t pad;
>>>     uint64_aligned_t total_pages;
>>>     uint64_aligned_t free_pages;
>>>     uint64_aligned_t scrub_pages;
>>
>> ... add no new fields, and the only producer of the data zero-fills the
>> struct first thing.
> 
> Yes that is right, I will wait to understand how I can proceed here:
> 
> 1) rename arch_capabilities to arm_sve_vl_bits and put vector length there.
> 2) leave arch_capabilities untouched, no flag creation/setting, create 
> uint32_t arm_sve_vl_bits field removing “pad”,
>     Use its value to determine if SVE is present or not.
> 3) ??

3) Introduce suitable #define(s) to use part of arch_capabilities for your
purpose, without renaming the field. (But that's of course only if Arm
maintainers agree with you on _not_ going the proper feature handling route
right away.)

Jan



 


Rackspace

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