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

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


  • To: Julien Grall <julien@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Thu, 13 Apr 2023 16:10:13 +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=IO2qus3IghDRLaMTgWF8VVy8MG262oH2O/6uT+AqoAo=; b=KdSLeSXLM/ClIh10YjREFY13CZCjdoj6Tzl9GSac4blFqwgCBjq4JEL0bdsxENvNwsSvf1qidS5GAqqIhjXenNKMtk3LoSIsdjEsjQOhoVCODfedR9rxFlGUE7xh0om993Q2vlijfyShYTBspYWlNV4qlNSHviqsVTm6BuafPhwsFCXUovvHoFFjMQ8nB6FYnVhkNv6mcRl+G+C/XXK/NWsuG+UxRKWOVazEBiZsRWHjtaeydE0HUYBmv/jXVZqdKvn4nweXPjNFqXQKZS5tY6Zti8LjLseB84VxELZWVJvqhKGoZqsXW2abX//1XFvv+xUpFpxJItMchuglIrjw0g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=behBL2xBPSwaFw1jUmKfiDCzr9fcq3nL+2jrsPeosm44WoBazoX8jdYs065GaDW8YRTHxewqVDyOB741ygbLzGbB9XB+jxyewvxbrY1mKE3RyoYdqTpe6H72i0ELNCzAWe+xc0FTlwAGtjIi+EfWyO8aIrs1MVN56Ue9q+r0f8IYNA0VJ5EQqPi+JHAHIMIx6yjLwS5etCwoxm51ixMQRgjMsPzv06TiThf2pC1KLI3KseBTKMF8z4RX3swUFZMI7mxJb5XtZLs6jFtYL7K0gfEzR+Ufhh3nGNK6NyRI9ahvTQ82a+AgJhnXwEtO3+mQZaEy2ov0nqvg5YB0S9Ax/Q==
  • 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>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Wei Chen <Wei.Chen@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Thu, 13 Apr 2023 16:10:50 +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: AQHZbSQ9GJqCFHqaX0uCiT+EC9U7s68pNK+AgAAHnICAAAGIAIAACdqAgAAi2YA=
  • Thread-topic: [PATCH v5 02/12] xen/arm: add SVE vector length field to the domain

> 
> 
>> 
>>>> Can we move this somewhere else to avoid adding extra padding? Also 
>>>> shouldn't this be protected with #ifdef CONFIG_ARM_64 to make clear this 
>>>> is not supported on Xen 32-bit?
>>> Yes, I’ll move it and protect with CONFIG_ARM_64, is it ok for you if I 
>>> move it after:
>>> /* Monitor options */
>>> struct {
>>>    uint8_t privileged_call_enabled : 1;
>>> } monitor;
>> 
>> Please check the padding with "pahole". If possible, it would be better to 
>> re-use an existing one.
> 
> Ok I’ll try to use the tool

I’ve managed to use the tool, the field seems already in a good spot:

struct arch_domain {
        enum domain_type           type;                 /*     0     4 */
        uint8_t                    sve_vl;               /*     4     1 */

        /* XXX 3 bytes hole, try to pack */

        struct p2m_domain          p2m;                  /*     8   328 */
        /* --- cacheline 5 boundary (320 bytes) was 16 bytes ago --- */
        struct hvm_domain          hvm;                  /*   336   312 */
        /* --- cacheline 10 boundary (640 bytes) was 8 bytes ago --- */
        struct paging_domain       paging;               /*   648    32 */
        struct vmmio               vmmio;                /*   680    32 */
        /* --- cacheline 11 boundary (704 bytes) was 8 bytes ago --- */
        unsigned int               rel_priv;             /*   712     4 */

        /* XXX 4 bytes hole, try to pack */

        struct {
                uint64_t           offset;               /*   720     8 */
                s_time_t           nanoseconds;          /*   728     8 */
        } virt_timer_base;                               /*   720    16 */
        struct vgic_dist           vgic;                 /*   736   200 */

        /* XXX last struct has 2 bytes of padding */

        /* --- cacheline 14 boundary (896 bytes) was 40 bytes ago --- */
        struct vuart               vuart;                /*   936    32 */
        /* --- cacheline 15 boundary (960 bytes) was 8 bytes ago --- */
        unsigned int               evtchn_irq;           /*   968     4 */
        struct {
                uint8_t            privileged_call_enabled:1; /*   972: 0  1 */
        } monitor;                                       /*   972     1 */

        /* XXX 3 bytes hole, try to pack */

        struct vpl011              vpl011;               /*   976    72 */

        /* size: 1152, cachelines: 18, members: 13 */
        /* sum members: 1038, holes: 3, sum holes: 10 */
        /* padding: 104 */
        /* paddings: 1, sum paddings: 2 */
} __attribute__((__aligned__(128)));

> 
>> 
>> Cheers,
>> 
>> -- 
>> Julien Grall



 


Rackspace

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