Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp2974583pxj; Mon, 10 May 2021 15:24:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwVBqs3PJ95h8epzIXscvR7AC+Rb3Bt9CThWYtSL35deunk2kz9LXhnHrwJYHvA6cMGdBe1 X-Received: by 2002:a5d:9343:: with SMTP id i3mr16925495ioo.77.1620685480857; Mon, 10 May 2021 15:24:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620685480; cv=none; d=google.com; s=arc-20160816; b=kj7RSch5/iwRZ8PnZqyX5VOSY5zGEI5QBx1XW6dHbeZbfQdo22vSotffFrejsupA/a o8HJMRCUjKT7j8G579XWbgJUKVG4OjJrACoFLQg54EUjg2Tu+S3nex5nHhOn5gzSU72G HiAqx7KfqMohvv8w4tGoycAbQMyVyd9jLzJYALj836qSpyrJhYd232DpkDzGEbteicAC fmcDYTk78y57WX3LhSE9m85hQZkOGyD5lUqMrhFCOAluve1yvgS6GITCcOHPvmPl8Xvz 4vyKHf8hIjpYMKzotbYJvKwoFjneIsHJPVDrgeR9zoTVwYow5JVzkQzF+TN1zf4VF781 2Nqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:ironport-sdr:ironport-sdr; bh=unn68MdyK2zR6MeJ+4B4HHjsdQV2DyT7a0B2K+wIfIo=; b=fmvOMqHid6M4igX2r4tETtWMxmeaIDaa4b0dmYp6sKxowYN6mfYBixy1yB4my7vSqR HuRq4tFFJofL7Jy2vEzYl1RL87hrcBeydtqX0aSKLzSBd/NetsnGQ6vtdoKBGCPRUOlS UPOo8pAhz9F4Od/lGXnya/7ZikzOKavR94yhpSMs2vKv2w9Bep8vubDalK2a98CSbvmD fGZCDW8zhFRk2bn8CNDm6ReETM6qNi7724w1Cxf0DJzyyNWcXEbKyrg6KtG2b2nyYf4R hj6eD9/VS9MVlbEnAp/3ncx6Zcsq6Q8xW+LbkpxH5zz4gcTAaN6eh+WquK02peFDh6Yl ImRQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n4si17156646jap.69.2021.05.10.15.24.28; Mon, 10 May 2021 15:24:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230238AbhEJWYQ (ORCPT + 99 others); Mon, 10 May 2021 18:24:16 -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