[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 01/12] xen/arm: enable SVE extension for Xen
- To: Julien Grall <julien@xxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Fri, 19 May 2023 15:13:51 +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=nz/EAoLLiHuYxeS/yb49OuErXbPQ6y/GQYH2gzgWFyE=; b=IZRR4i4wD1m2ZOPUoOi1NQLdSjQMgxsAoDEzIzMq2+O7BrdPqDr48C3IG3BmsUg//jgh/S5KC5mBfEmtwQPqtnQ7RWQsotNtWwksh75DcImaPeZIuYRuo6I7me8p+A94hf6+QD1/77GodI7paP84VX6AU5PHk0H8iHt2hZo451bccy9bkSP5ZBcEkgkdy8M/oX2zv8G0flUa3qvUi5V3aZIuHu0gXe7Gafw0qaO4iXgjdBV5XDuiu0PZrwUQGFF0ushP4qx1K5vDHQAwAU5qfB7/z9uRixUJFqH296sFhseL1Lv8P8qhHoiJnusI8VByOeH/FiH7EiQkZPPoEAlEBg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RCWrhkqXqmkCGF5WPs78yifEPl1IAzea/YJ+I3NTYl9nJoRzeUWjA186ZfVixhde9+lh6qy0jylMw3FbJSltl9jU75J3vDz1b6AQl4CRl0cAq17FSTpg1LlyrTSbe8tn3NIisXh/JkS4tl/yTmkp4iRRG7KDGS/UanKwc+yv0PWS87dx7rvfiWsZLwhnFFrNlfutHJJsjmYO92/JRMwfhR8Mqf+5UOZ9WdAqygdze8qffZeoCy3lzAqOf4ffvfimNtMdOUxiWNrrM5Hw7noWW8Ir+Be9/uT7nPFj/Tx3AZA4l2pu+DFJUrhXS2A3uMcSftTkTKgmkb/bV31hFdQNcw==
- 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>
- Delivery-date: Fri, 19 May 2023 15:14:27 +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: AQHZdnKBJmFHv6Wq8kSjvXctD+zlI69f6zCAgAHjioCAAAXEgIAAAV4AgAACogCAAAOZAA==
- Thread-topic: [PATCH v6 01/12] xen/arm: enable SVE extension for Xen
> On 19 May 2023, at 16:00, Julien Grall <julien@xxxxxxx> wrote:
>
>
>
> On 19/05/2023 15:51, Luca Fancellu wrote:
>> /* Control Registers */
>> /*
>> * CPTR_EL2 needs to be written before calling vfp_restore_state, a
>> * synchronization instruction is expected after the write (isb)
>> */
>> WRITE_SYSREG(n->arch.cptr_el2, CPTR_EL2);
>> WRITE_SYSREG(n->arch.cpacr, CPACR_EL1);
>> /*
>> * This write to sysreg CONTEXTIDR_EL1 ensures we don't hit erratum
>> * #852523 (Cortex-A57) or #853709 (Cortex-A72).
>> * I.e DACR32_EL2 is not correctly synchronized.
>> */
>> WRITE_SYSREG(n->arch.contextidr, CONTEXTIDR_EL1);
>> WRITE_SYSREG(n->arch.tpidr_el0, TPIDR_EL0);
>> WRITE_SYSREG(n->arch.tpidrro_el0, TPIDRRO_EL0);
>> WRITE_SYSREG(n->arch.tpidr_el1, TPIDR_EL1);
>> if ( is_32bit_domain(n->domain) && cpu_has_thumbee )
>> {
>> WRITE_SYSREG(n->arch.teecr, TEECR32_EL1);
>> WRITE_SYSREG(n->arch.teehbr, TEEHBR32_EL1);
>> }
>> #ifdef CONFIG_ARM_32
>> WRITE_CP32(n->arch.joscr, JOSCR);
>> WRITE_CP32(n->arch.jmcr, JMCR);
>> #endif
>> isb();
>> /* VFP - call vfp_restore_state after writing on CPTR_EL2 + isb */
>> vfp_restore_state(n);
>> Maybe I misunderstood your preference, do you want me to put the write to
>> CPTR_EL2
>> right before the isb() that precedes vfp_restore_state?
>
> Yes please. Unless there is a reason to keep it "far away". The comments look
> good to me.
Ok, a question regarding README.LinuxPrimitives, is it some file taken from an
automated tool?
Because I see there is some kind of structure, how can I know if my syntax is
correct?
>
> Cheers,
>
> --
> Julien Grall
|