[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: Luca Fancellu <Luca.Fancellu@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 22 May 2023 14:41:52 +0200
  • 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=djhZqu2mP+2/iJCck3s6urYbtm0UlkyDVzwDbEbfYNQ=; b=UBB2Xhvm5CKsIBT+vVSrvQROlfeKMC5jCNOqYROY9TIvJePpQfFB01S0CB/NGC+DoBFAB6RkjSUsPL/wP4ahWv+sSknUu0gqGYC/XgxHvG9uahXQ/Xr2usQlTQ+BkVeUxwf+odouopgBr6TybFbD/SsweDt0RORH3JO2VCemGtzdasqL2yxSIueIwAounzd2Sla1lDYm00xn2x2cnR7RLaAdHLTIDmt7HKCdf0CvoAM2zdQqeWzxW8Ac5PFf015is7H9239uo7rRSCUvUBCVuHnJoIZ+dVNKtJLSuu9G3SXCpGnPHDIz3y6oRFYVW/7uQHKU8DNkRggAw7ZtHCxEpQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NURwf9W7lfJBn84thO40Cgg5KgkpO5tPFORTDrB24FzMbPTf4HFH0qyLBhMvgm9bvzOOwjy0lUuYAKo6qNJ0FmAZKbnUZXWq1+VkCEATH5NaWUa17huLbplUi+n8zARPBnJmI19IvszBFY/v8pJYE+V/txUaLFY7EQDdtvW5I9XOnnwhqc/sLXq0csmtONS29fAY5V1e20UQaYj6vZtHp8EsMke9XsMiEtKBCTjba0TEdx0vY4TAUCzU8GXUCXjHI79/szP/x9pi4R8+Wd144eA5Vdr3KU9ZAwgebrl9QDaB3P2jpCmGkLDXpWBIv6oJIPoQB4RZ/OPdkUKfjrZ5vQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.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:42:03 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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)?

Jan



 


Rackspace

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