Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp825209imm; Fri, 27 Jul 2018 06:50:49 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd8WgAVIOf5GFdNWTtUtqRNOnFrxXqhK+vDmeTjk6Bfv6ujDKuuqZyGLhvcoI8A3GRBjNuR X-Received: by 2002:a63:2043:: with SMTP id r3-v6mr6367787pgm.105.1532699449000; Fri, 27 Jul 2018 06:50:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532699448; cv=none; d=google.com; s=arc-20160816; b=OOeSA8xDS2sFAq0YFafd6Nb/53OWXzEK2PAUwXcNbabwyjBCD9zj0s8DBuw915SifT mLYwRd8BKZoQmW/avx1PCv3mRSrff91JwgFuWSwsjkwVPK25UZ7lZLh7vIQHltXcImFI ulgU6YS4V4AFTgLZctlwtMCDQCM9kmzcokv0lOhyreMf6vO4YhODcaE2Q67qtWn+IGT+ wrBBShL4R81wtaY9EI8X+u/n8/A4c0GCTGjo9D+x5yCDVh30a1i9rXPmVguf25S8IluX kVNAT/bAdjsYZnPiCOBztyS4EelLQT7cdTT2SJd3r5KyvED+7njDuB6STU6tzS0q+3PT uTow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=ny1o2jg810v9ouTwzCbO2A3MzDraCvLp2H0T87kOVPg=; b=lPA0G6W4dhou51PwsZPq/z/8u79wsyIE0ehKHdZcJqoGIvl5rL2QUF3drr2VEy7W3y vm6jnvoIvKKMqdo52wiR1piFGycnghJpdp8foWIOImZzhnhR1i72MygKywCRL66YM1Ra uUd6qVhqshkKepZaoBABrchz8Ik0tAh1uDPz+0b3laKKLWzSqKVGPXlm4XkFlF2j+3g7 nZV6Ko/1gv3df8A5ECMtKwWXNHsRX4Z1RFlthiLnOZ3btZZwT3hOAIQ/RiDepMbMeHUd p4CIZmIb9uXLIlrfddBPKTqWxscHhaVrYnxwXlH9Qk4JXVEKLUkXCVb4O5fuuhFf48l4 fhMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=y6d7HfV4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m24-v6si3728094pgl.452.2018.07.27.06.50.34; Fri, 27 Jul 2018 06:50:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=y6d7HfV4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730836AbeG0PLr (ORCPT + 99 others); Fri, 27 Jul 2018 11:11:47 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:38732 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730340AbeG0PLr (ORCPT ); Fri, 27 Jul 2018 11:11:47 -0400 Received: by mail-pl0-f65.google.com with SMTP id b1-v6so2353107pls.5 for ; Fri, 27 Jul 2018 06:49:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ny1o2jg810v9ouTwzCbO2A3MzDraCvLp2H0T87kOVPg=; b=y6d7HfV4EDeU21cyNvCkp355HAhpSSyLVVWJnLE40UxDxqAqxADYM+nGa9vT442VgR ItDW5+5VgnUm2BebYY1az3Eh9wYMuJ1MNOSK07J2Ee58ciNXTa9Kxh3EfyAN5CVO8q7O YliPhrGa1CJWv1okVqCiC9dFp8zX1tK+KdzjCDk4Rch63LjwzwZLF6Us2RU+jbTzeSdo 3bUJ+s4YTg0zXmVwaNlkJ+zmALWcRqs59qxKfVTfhl/0Ueozxiy73+/8T3Dgc82pWBXE BgGRsYV9u6V7HAwNrbqHF1JxmcLsPgrc2/ZUfwFfsSLUdbHdhIQDZ8DwDVvQigXxs/CF n+Hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=ny1o2jg810v9ouTwzCbO2A3MzDraCvLp2H0T87kOVPg=; b=ZRCwzllv3Y4X+1/iiObo5hN6/ri7WqRsDVKbWXgmbbU4muFVkV04VDL0UACa/CtTDf 6WWiFdbxWXUT1o5DpKkDkwJArQAG0KQkuLCjoivy9KLhpchZTxpL0c8upZByTGscEmw9 z5iyYVPRs+MgnFFs3VZganfQ0ftOxpjGiYSEKjg7f3oJNMP0A6dZVWlSVqLhhMEWnSNb WSJo7HxHkVjXY2hKllYzLlUyiQB5dPe0ApJ7obW+T/giMroXmV9Drw51gqM+x5kthD2D 4HD9zZwVKm+ldQRc0w51I76ACw6FziCE/7nqV7jBIVDor4Bt40U6DX06oDHOCTY3kSJv 9mFA== X-Gm-Message-State: AOUpUlF1lHUOhANv7LLUEHQMG5aWBQHSHeCCQWowuVZ0s0JI6G0AYyPI 1vCqaCRrzBn6tfaFGiboNHrgSg== X-Received: by 2002:a17:902:32a4:: with SMTP id z33-v6mr1877985plb.226.1532699386063; Fri, 27 Jul 2018 06:49:46 -0700 (PDT) Received: from kshutemo-mobl1.localdomain ([134.134.139.83]) by smtp.gmail.com with ESMTPSA id b62-v6sm11142425pfm.97.2018.07.27.06.49.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Jul 2018 06:49:45 -0700 (PDT) Received: by kshutemo-mobl1.localdomain (Postfix, from userid 1000) id 3C6953002A5; Fri, 27 Jul 2018 16:49:41 +0300 (+03) Date: Fri, 27 Jul 2018 16:49:41 +0300 From: "Kirill A. Shutemov" To: Dave Hansen Cc: Thomas Gleixner , "Kirill A. Shutemov" , Ingo Molnar , x86@kernel.org, "H. Peter Anvin" , Tom Lendacky , Kai Huang , Jacob Pan , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv5 18/19] x86/mm: Handle encrypted memory in page_to_virt() and __pa() Message-ID: <20180727134941.mljg2biwughv2yhr@kshutemo-mobl1> References: <20180717112029.42378-1-kirill.shutemov@linux.intel.com> <20180717112029.42378-19-kirill.shutemov@linux.intel.com> <20180723101201.wjbaktmerx3yiocd@kshutemo-mobl1> <9966c343-1247-b505-b736-b06509e15d10@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9966c343-1247-b505-b736-b06509e15d10@intel.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 26, 2018 at 10:26:23AM -0700, Dave Hansen wrote: > On 07/23/2018 03:12 AM, Kirill A. Shutemov wrote: > > page_to_virt() definition overwrites default macros provided by > > . We only overwrite the macros if MTKME is enabled > > compile-time. > > Can you remind me why we need this in page_to_virt() as opposed to in > the kmap() code? Is it because we have lots of 64-bit code that doesn't > use kmap() or something? I just found it most suitable. It should cover all cases, even if kmap() is not used. -- Kirill A. Shutemov