[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: Julien Grall <julien@xxxxxxx>
  • From: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • Date: Mon, 22 May 2023 10:20: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=veH7LOmkRutYLp6hm7b/yDxduAHVlwwYtauf6OoXvuo=; b=gmxxKL5Dy4mW8tTqfWpQSwbHo88LRN9aaThbVHBgjaVCo5in3KWPFWUy1G2jUFZb9hREO+BYTbE39pECeD+h5kC/oLRrUOSDrc/iGrwtryadldzu5hEfPhDfuOgq+9zdmzwa7vM3Ek+rXhg5OfotWv0Tz0g+oJjO8LJYpfyCdnaLmFsdIb9MJzSoRnsHpRVqagTSomr5/w5wuSDjoZv8NxPfoo3U7qXVPOOd9jzuc8MW2LJlbXvGkE4Bh6rGSnNnYH0ztZ0CIstukRW0Qkwqvi3xRxnvBN+ocdLTWtWp40/apUG4V+NBkZQ2nDkFFibTfoSawIIHBrhEkR6WBqirMQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NxSHU5KBPRoxeEBRjCFibyEZBx8xkhVW4nxA5M+c70hLP/6otgR/XJG27jJVVy5HYJmp5oKazYt64O/zxDUfZrNUya+891iO0DNbZe5G+u7czPz8sc8/yY2lHSYifjuAO1Yc0e75RSfFcw2dmvbPj3w3QVJnL66ugxid70uEe/FNr2rrILYnUHYDQQfYRBhFSYMnrjgca4W76wa41IGsJKnMIZqDDPBWtcop0kUUhYfrmbAfPW3ziLi9tR2+jpuOHfzVWfaCuUfqPrk/6cUixwGy1wvPZjDEgOt0QpmQlb4oL0YXTDkToBc8+gKq5As6joZy9J41fH9eEW0nU45Ndg==
  • 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: Mon, 22 May 2023 10:21: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/O74mILlnGa9ggLQAgAXAhAA=
  • Thread-topic: [PATCH v6 05/12] arm/sve: save/restore SVE context switch


> 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;
}


> 
>> +}
>> +
>> +static inline void sve_context_free(struct vcpu *v) {}
>> +static inline void sve_save_state(struct vcpu *v) {}
>> +static inline void sve_restore_state(struct vcpu *v) {}
>> +
> 
> -- 
> Julien Grall


 


Rackspace

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