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

Re: [PATCH v2 1/3] x86/retpoline: rename retpoline Kconfig check to include GCC prefix


  • To: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 17 Feb 2022 10:04:01 +0100
  • 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=QEjLKlgDrHQLTdfmcBcuuF+HC2FjTqBwkMW2qXBOUnA=; b=GYub6zLE8RLgr8GiJ1gGuTCRzDIWS1PDcLCXbosaP06ueewaMv/ESgVTwD6iVWxTkwZPJfs4wLbFAqzIoLqmVcSGU5GalDjK2U+gTTQh2eOZo8uA7qPkdv+o9ThU9Vo5Qmv6jUjG5XhkO3ZV5FG8KKuOVteVKZutijiRZTGcgPaSpyxvusoTftav2RAKcC1J2mnmCUDwfaaBDBnE2pvJ4N6yUWBYCchdOEan8MDv03EcgXy3EUdL6C340ZltGEpxtrwAf0AD0PChltaWu+HL1OcGQ/r9MUYipSS7i+zTHvq4Do7d6GwV/qwhMaDWoc4CTDNzQp1VXEe/0ABaCwwysQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DGgaN/AtwtSJTI9afis4B0q3Y/2NGCUxWiv+TyvxqGfAFyzw8exZccDrRd7ZVdktUMqDemr/iw46QqIjfrbTYinK9GR+Vf6ECt06kM90UsHlGu9hHwI52IlBjXmxmsUWOl2gK1RmkNCJrfplQ0Drv/tU6DaL3OLTEySpzRLvJhcQMC3ElZSnrXXWxQHIynI8fheZ236ZbfvEQsGYK3y7nrU/RvVOjqE5fSu1WgrS7yoS6NsTGXJGrbCw/RBkom/+1+JsamzuV/QSyCqIBTpkDsFvCadyufO7GlbXaYNmviCvStFv1hhE5iMKHuFc4O6ni/xb/n7c8CriStvuJoTUvw==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 17 Feb 2022 09:04:11 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.02.2022 09:59, Jan Beulich wrote:
> On 16.02.2022 17:21, Roger Pau Monne wrote:
>> Current retpoline checks apply to GCC only, so make it obvious by
>> prefixing the Kconfig option with GCC. Keep the previous option as a
>> way to signal generic retpoline support regardless of the underlying
>> compiler.
>>
>> No functional change intended.
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
>> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
>> ---
>> Changes since v1:
>>  - Put def_bool before depend on.
> 
> Just for the record: A slightly shorter alternative would have been ...
> 
>> --- a/xen/arch/x86/Kconfig
>> +++ b/xen/arch/x86/Kconfig
>> @@ -32,9 +32,13 @@ config ARCH_DEFCONFIG
>>      string
>>      default "arch/x86/configs/x86_64_defconfig"
>>  
>> -config INDIRECT_THUNK
>> +config GCC_INDIRECT_THUNK
>>      def_bool $(cc-option,-mindirect-branch-register)
>>  
>> +config INDIRECT_THUNK
>> +    def_bool y
>> +    depends on GCC_INDIRECT_THUNK
> 
> config INDIRECT_THUNK
>       bool
> 
> config GCC_INDIRECT_THUNK
>       def_bool $(cc-option,-mindirect-branch-register)
>       select INDIRECT_THUNK

Oh, looking at patch 3 again (which I should have still had in mind)
this would of course not help. Yet ..

> A more appropriate thing to use for "depends on" might have been
> CC_IS_GCC. With the next patch in mind this would then avoid
> potential confusion if e.g. Clang folks decided to (also) support
> the gcc style command line options.

... adding this dependency (and a respective one in patch 2) might
still be a good thing.

Jan




 


Rackspace

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