Received: by 10.213.65.68 with SMTP id h4csp811797imn; Thu, 22 Mar 2018 09:04:31 -0700 (PDT) X-Google-Smtp-Source: AG47ELuvKD906CWReF/BIuABZWh0uqK+xnkJRjJOEWNcb+aVo3UmBMkyZ6Ce83fFBCmD5rkX0rlJ X-Received: by 2002:a17:902:c81:: with SMTP id 1-v6mr25399742plt.205.1521734671604; Thu, 22 Mar 2018 09:04:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521734671; cv=none; d=google.com; s=arc-20160816; b=SFlChUmxi7K/DfIMmXU5ZZievfGs+djRJwD5Mjz7SzHtjvTsLJ6qMxnzZbawjS/SCz VMC4t4g9iwWa8voS9f2yCGwLmwyaPZ0tdgR9qZp852bMqFnZKKmpEVCROGioOYJXP7zL 5i+ugh7QmphYoiGkuPMJBjOvheAViu1DNU2jj/iuDEKzHuMFiN6hlRQX0blw5RBu1h07 6wYWfByruy2ID+9oa2WClUObyrHHgDUnKQ0lDeA720h/I/t8uPwUSELmf+zLyHOg79l3 g80uVyjoP3TQI73xIYGwh8x245iTM/LOxIcv8GtsbVzXDOzAhG1Rb/7tEsGPvey5C/Wv Ewpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :in-reply-to:date:references:subject:cc:to:from :arc-authentication-results; bh=FKJuEEbn74a6MHgfK4mLINx1Fmcyop5BiPc8qLBTPI4=; b=FxB4QcVhl+AnCGIuizkEzvYLM4efkXuw0xO7Yk4t/IV3IqbQDScq3YgiJ4izXtufAY 1p97qDherHqGvlFO1hEkyeULj9mIYiEhH5Gxu37lF0ODwHMjWq6GDI695cwTFkMTeaOK 9G+9YqJrLlscVuoxTnuQrGAig9HKLWEL+7uvINxJEo9rHwDB3hFj2QPIaRJH29FPikx9 xwYeczD0bmqZrydYW/RWzj6mb5qjPktZhpcRywv6q8sLgUUQSq98Ft3PPTsP+47m0cSE 759GUIlhqRbuLEFSpAmcTcnNV3mHEEw0r28m54xefTvJ3CpnCfjqR6YZw27ouRvPnYJe nkdw== ARC-Authentication-Results: i=1; mx.google.com; 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 y16-v6si4975658pll.435.2018.03.22.09.04.15; Thu, 22 Mar 2018 09:04:31 -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; 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 S1751732AbeCVQCM (ORCPT + 99 others); Thu, 22 Mar 2018 12:02:12 -0400 Received: from foss.arm.com ([217.140.101.70]:39552 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750992AbeCVQCJ (ORCPT ); Thu, 22 Mar 2018 12:02:09 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 034921529; Thu, 22 Mar 2018 09:02:09 -0700 (PDT) Received: from localhost (e105922-lin.cambridge.arm.com [10.1.207.29]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 753A83F24A; Thu, 22 Mar 2018 09:02:08 -0700 (PDT) From: Punit Agrawal To: "Kirill A. Shutemov" Cc: Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Tom Lendacky , Dave Hansen , Kai Huang , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC, PATCH 08/22] mm: Introduce __GFP_ENCRYPT References: <20180305162610.37510-1-kirill.shutemov@linux.intel.com> <20180305162610.37510-9-kirill.shutemov@linux.intel.com> Date: Thu, 22 Mar 2018 16:02:06 +0000 In-Reply-To: <20180305162610.37510-9-kirill.shutemov@linux.intel.com> (Kirill A. Shutemov's message of "Mon, 5 Mar 2018 19:25:56 +0300") Message-ID: <87sh8s14ld.fsf@e105922-lin.cambridge.arm.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Kirill A. Shutemov" writes: > The patch adds new gfp flag to indicate that we're allocating encrypted > page. > > Architectural code may need to do special preparation for encrypted > pages such as flushing cache to avoid aliasing. > > Signed-off-by: Kirill A. Shutemov > --- > include/linux/gfp.h | 12 ++++++++++++ > include/linux/mm.h | 2 ++ > include/trace/events/mmflags.h | 1 + > mm/Kconfig | 3 +++ > mm/page_alloc.c | 3 +++ > tools/perf/builtin-kmem.c | 1 + > 6 files changed, 22 insertions(+) > > diff --git a/include/linux/gfp.h b/include/linux/gfp.h > index 1a4582b44d32..43a93ca11c3c 100644 > --- a/include/linux/gfp.h > +++ b/include/linux/gfp.h > @@ -24,6 +24,11 @@ struct vm_area_struct; > #define ___GFP_HIGH 0x20u > #define ___GFP_IO 0x40u > #define ___GFP_FS 0x80u > +#ifdef CONFIG_ARCH_WANTS_GFP_ENCRYPT > +#define ___GFP_ENCYPT 0x100u > +#else > +#define ___GFP_ENCYPT 0 s/___GFP_ENCYPT/___GFP_ENCRYPT? Thanks, Punit [...]