[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v6 05/12] arm/sve: save/restore SVE context switch
- To: Jan Beulich <jbeulich@xxxxxxxx>
- From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
- Date: Mon, 22 May 2023 12:43:21 +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=pppqCx3b5ghZhsVDbkSYebN87OX1KJ+kKUlMjO1a4xc=; b=czZBtvZM5Id6a+uuXtYbKO+0YgWYqZtbecJwwqIxpPAzyZF7J1oEGWgF4fw8HxRhuIexanTIDO7V7wOrvxpnc6YjaTvmIltjkxAoZRBGRDV8jlhY1N2IUftYOY02dcjRVCV2Inlk0HjTWzWFzqz00QWvViQ2yLe+0u6uKNyPRZTj5EAaMRow6I+6THLQFZ5b86luK9UPrAfkNyqkpu9w0Ll8Tu4uqpEjEnm3YeN+GSPHbmoTdXaPCXMMf3gBiD3mgeMYnqtuKlNNfu4wqxgIaZzDv7yBOqtdVvurWf7MVSoz5ZCAWN+1EepNdeo3lrt0JqR5NY3hofKHdh6MUB59Cg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MHcf/q5mm/Z5QyIyiHD4FxoZFa/QKT3v+xPt8fHhezc9P+F64EeGrhvRmbtw+4Uu/svqT4UJOW7oxUYdoOpWUGCNNXmWXtyX7P7TBI3ykRPeEZHrsZs4c4TUvO/yTAPl2SYv/GeD7S8ScYRPHcRsSR1sE5QacxqXh9/lIzlu69e1P6PWOQExz3Kz9o7tYo4EaJmfawBNamNymKW4bGYjgegX4tjT+s3S4GZdCKRi2MGmug/PVvBc/zRWo1i6Y5OGAS6Ba6HPDbxs7e55Eap9iU++EOWkY5sJ0EArMQDFEDbNzZceoG5PazFVFEEdnkh0nugEnGW5nTGQBq//dVqPyg==
- 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>, Julien Grall <julien@xxxxxxx>
- Delivery-date: Mon, 22 May 2023 12:44:23 +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: AQHZdnJ92qfFeC693kK/O74mILlnGa9ggLQAgAXAhACAACdzAIAAAF0A
- Thread-topic: [PATCH v6 05/12] arm/sve: save/restore SVE context switch
> On 22 May 2023, at 13:41, Jan Beulich <jbeulich@xxxxxxxx> wrote:
>
> On 22.05.2023 12:20, Luca Fancellu wrote:
>>
>>
>>> On 18 May 2023, at 19:30, Julien Grall <julien@xxxxxxx> wrote:
>>>
>>> Hi Luca,
>>>
>>> One more remark.
>>>
>>> On 24/04/2023 07:02, Luca Fancellu wrote:
>>>> #else /* !CONFIG_ARM64_SVE */
>>>> @@ -46,6 +50,15 @@ static inline unsigned int get_sys_vl_len(void)
>>>> return 0;
>>>> }
>>>> +static inline int sve_context_init(struct vcpu *v)
>>>> +{
>>>> + return 0;
>>>
>>> The call is protected by is_domain_sve(). So I think we want to return an
>>> error just in case someone is calling it outside of its intended use.
>>
>> Regarding this one, since it should not be called when SVE is not enabled,
>> are you ok if I’ll do this:
>>
>> static inline int sve_context_init(struct vcpu *v)
>> {
>> ASSERT_UNREACHABLE();
>> return 0;
>> }
>
> Do you need such a stub in the first place? I.e. can't you arrange for
> DCE to take care of unreachable function calls, thus letting you get
> away with just an always-visible declaration (and no definition when
> !ARM64_SVE)?
>
Right, I always forgot about this approach, I’ll try that
> Jan
|