From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8B102C433B4 for ; Thu, 20 May 2021 20:31:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 674766109F for ; Thu, 20 May 2021 20:31:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238840AbhETUcr (ORCPT ); Thu, 20 May 2021 16:32:47 -0400 Received: from mga06.intel.com ([134.134.136.31]:37433 "EHLO mga06.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235538AbhETUcm (ORCPT ); Thu, 20 May 2021 16:32:42 -0400 IronPort-SDR: dqD6JvrRXuKGjvkp0dWgFxL7OA03mVA3uv8dXBkSA9eXV1wS8mlKE0Z2fJHADugzuSbhI9qX4q fxNfOz8DhWvg== X-IronPort-AV: E=McAfee;i="6200,9189,9990"; a="262553249" X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="262553249" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2021 13:31:20 -0700 IronPort-SDR: EVUx6zJQVeJDjOiLEwOxA8zkizKqjhnPG0Kuf2adK5gWpJjD/yfEPrsfjIE7JEdcfylegkz3db j13lfu1evqiw== X-IronPort-AV: E=Sophos;i="5.82,313,1613462400"; d="scan'208";a="475366526" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.212.197.177]) ([10.212.197.177]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 May 2021 13:31:19 -0700 Subject: Re: [RFC v2 27/32] x86/tdx: Exclude Shared bit from __PHYSICAL_MASK To: Sean Christopherson , "Kuppuswamy, Sathyanarayanan" Cc: Dave Hansen , Peter Zijlstra , Andy Lutomirski , Dan Williams , Tony Luck , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , linux-kernel@vger.kernel.org References: <87b31425b79df3cc44d2bdc6a79d6aa36c42d116.1619458733.git.sathyanarayanan.kuppuswamy@linux.intel.com> <3ae38a0b-0676-1543-7015-39a589b2807a@intel.com> <0df80c0f-e0da-e86e-0ab8-abc58f0da559@linux.intel.com> From: Andi Kleen Message-ID: Date: Thu, 20 May 2021 13:31:11 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 5/20/2021 1:16 PM, Sean Christopherson wrote: > On Thu, May 20, 2021, Kuppuswamy, Sathyanarayanan wrote: >> So what is your proposal? "tdx_guest_" / "tdx_host_" ? > 1. Abstract things where appropriate, e.g. I'm guessing there is a clever way > to deal with the shared vs. private inversion and avoid tdg_shared_mask > altogether. > > 2. Steal what SEV-ES did for the #VC handlers and use ve_ as the prefix for > handlers. > > 3. Use tdx_ everywhere else and handle the conflicts on a case-by-case basis > with a healthy dose of common sense. E.g. there should be no need to worry > about "static __cpuidle void tdg_safe_halt(void)" colliding because neither > the guest nor KVM should be exposing tdx_safe_halt() outside of its > compilation unit. Sorry Sean, but your suggestion is against all good code hygiene practices. Normally we try to pick unique prefixes for every module, and trying to coordinate with lots of other code that is maintained by other people is just a long term recipe for annoying merging problems.  Same with coordinating with SEV-ES for ve_. Is it really that hard to adjust your grep patterns? I'm not against changing tdg_, but if it's changed it should be something unique, and also not too long. Today tdg_ fits that criteria nicely. -Andi