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 8DB0EC433ED for ; Mon, 10 May 2021 22:23:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 54478611C9 for ; Mon, 10 May 2021 22:23:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230329AbhEJWYR (ORCPT ); Mon, 10 May 2021 18:24:17 -0400 Received: from mga11.intel.com ([192.55.52.93]:24460 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229996AbhEJWYO (ORCPT ); Mon, 10 May 2021 18:24:14 -0400 IronPort-SDR: ArUwDwcoZr7K/2Ls0g0RBHWUOAnb8OCGD01iCuqEFz47vhD82naffFp2MgVKVVkfI83gRLY0Nj NRbZfDQcIJbQ== X-IronPort-AV: E=McAfee;i="6200,9189,9980"; a="196208612" X-IronPort-AV: E=Sophos;i="5.82,288,1613462400"; d="scan'208";a="196208612" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 15:23:08 -0700 IronPort-SDR: v9D5f0p3E1j4UcRjtDlD/DpbLQYbBoYivf/K6TAGzj3oiSW1o9KUsYftWnU9wyPt9CO/qmifZl 26qv90sygVeg== X-IronPort-AV: E=Sophos;i="5.82,288,1613462400"; d="scan'208";a="609256490" Received: from kcmorris-mobl1.amr.corp.intel.com (HELO skuppusw-mobl5.amr.corp.intel.com) ([10.213.165.53]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 May 2021 15:23:07 -0700 Subject: Re: [RFC v2 28/32] x86/tdx: Make pages shared in ioremap() To: Andi Kleen , Dave Hansen , Peter Zijlstra , Andy Lutomirski , Dan Williams , Tony Luck Cc: Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org References: <312879fb-d201-a16d-2568-150152044c54@linux.intel.com> From: "Kuppuswamy, Sathyanarayanan" Message-ID: <797c95bf-9516-8aee-59d0-f5259d77bb75@linux.intel.com> Date: Mon, 10 May 2021 15:23:07 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <312879fb-d201-a16d-2568-150152044c54@linux.intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dave, On 5/7/21 3:38 PM, Andi Kleen wrote: > > On 5/7/2021 2:55 PM, Dave Hansen wrote: >> On 4/26/21 11:01 AM, Kuppuswamy Sathyanarayanan wrote: >>>   static unsigned int __ioremap_check_encrypted(struct resource *res) >>>   { >>> -    if (!sev_active()) >>> +    if (!sev_active() && !is_tdx_guest()) >>>           return 0; >> I think it's time to come up with a real name for all of the code that's >> under: (sev_active() || is_tdx_guest()). >> >> "encrypted" isn't it, for sure. > > I called it protected_guest() in some other patches. If you are also fine with above mentioned function name, I can include it in this series. Since we have many use cases of above condition, it will be useful define it as helper function. > > -Andi > -- Sathyanarayanan Kuppuswamy Linux Kernel Developer