[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 Monné <roger.pau@xxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 17 Feb 2022 12:03:16 +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=Yfe7nauKf8aNurctFju3NHseneLi7dJXN6BM8N+QbyI=; b=WOH5/vVhBZyRJqW3vq71fGD5XLLipxdIqAakXlN79bpAdP2CQGaEF4C3UhAxeec+Gh5gZnUSWsg+33cy8qqUbihU2ui6BHWF2ud1NpAv5x4K8vMQkOw2bx7O/hd7QQAJcZ8tJLfQ28VoMfiONWdRsaufs749LwBtzRQYWKDVjj4YkZlthKeK6QHOB6qLRu4DcBG54zSV+H7ba3yek54XcIw6aSx6jrljRwSzLfIXVPB6zris+v7qHeAbbAiY+4+r4g4M4i5Kshe3aa+ho6X26JLaONfrFyMEgTxT90FtCoy42IiO7NCvfCsKjYp0/2fkEbNXw793hWNx2MhH/ijclQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iIa2idleg8NwJpGhVMBX77Rky8VJVUA+0Br6uaB7+dKtlkudpY29MWSAE5OkKbdWdHoDusJIbh1nfFtLMClhmj/hr8xpKMluwZMRtzLX1jYeBwrbYxdWO6MrFVwPg8e5nCTXWMx1gv4FPuyFKBMbCivbrVYmWKuO79LjWBAEFydJyXZayUz4zPy6tuJfmRJs9BP/n3LSmww9tcDIyZTYBW8eZmkqrFApToXq5vvaUIXwsXMDr60HICzB66//6l7lbTshMUARLfsnbv7XnsPqMLKXBlqx3EWoT+cP2t8TRVxVeUk8fzVwW5QHCOcjskPIXEVYPzgCUJq9uZXRd6jymg==
  • 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 11:03:28 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 17.02.2022 11:37, Roger Pau Monné wrote:
> On Thu, Feb 17, 2022 at 10:04:01AM +0100, Jan Beulich wrote:
>> 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.
> 
> So you would like to make GCC_INDIRECT_THUNK depend on CC_IS_GCC?

It would seem more clean to me, but ...

> That would be fine, but I think it's extremely unlikely for CLANG to
> adopt the GCC options - I've already mentioned at implementation time
> and they refused.

... I'm not going to insist.

Jan




 


Rackspace

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