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 E1DBCC433ED for ; Fri, 7 May 2021 22:39:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AC3D260FF2 for ; Fri, 7 May 2021 22:39:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229831AbhEGWkA (ORCPT ); Fri, 7 May 2021 18:40:00 -0400 Received: from mga11.intel.com ([192.55.52.93]:40597 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbhEGWj7 (ORCPT ); Fri, 7 May 2021 18:39:59 -0400 IronPort-SDR: h4ixepHKINKwu7gSAwAGjavpF/WTcTFMD/v/XV30Ia9Sk4i5eO0ojGn6LOmyW4jUDuT9bSgckT iyZIULZShnRw== X-IronPort-AV: E=McAfee;i="6200,9189,9977"; a="195717481" X-IronPort-AV: E=Sophos;i="5.82,282,1613462400"; d="scan'208";a="195717481" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2021 15:38:58 -0700 IronPort-SDR: ZBXrPw25IXrU/4YmVlfdSF0uphUGiQ/4F7neXlJQ2WEn6DAB4Als/TudqBquHSTXWYoaQLCXPq zDZ1SVZyuJ3g== X-IronPort-AV: E=Sophos;i="5.82,282,1613462400"; d="scan'208";a="533853025" Received: from akleen-mobl1.amr.corp.intel.com (HELO [10.209.54.125]) ([10.209.54.125]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 May 2021 15:38:56 -0700 Subject: Re: [RFC v2 28/32] x86/tdx: Make pages shared in ioremap() To: Dave Hansen , Kuppuswamy Sathyanarayanan , Peter Zijlstra , Andy Lutomirski , Dan Williams , Tony Luck Cc: Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , Sean Christopherson , linux-kernel@vger.kernel.org References: From: Andi Kleen Message-ID: <312879fb-d201-a16d-2568-150152044c54@linux.intel.com> Date: Fri, 7 May 2021 15:38:56 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. -Andi