Received: by 10.223.185.116 with SMTP id b49csp3836256wrg; Tue, 6 Mar 2018 05:54:34 -0800 (PST) X-Google-Smtp-Source: AG47ELsXtVbMX+C+weBQlFO6ZgFXGLKadx7IjFaIUEO/oOURK+Oz6WRlgrcxI3cLM0EiFpaqUdq7 X-Received: by 10.101.92.6 with SMTP id u6mr15203914pgr.440.1520344474457; Tue, 06 Mar 2018 05:54:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520344474; cv=none; d=google.com; s=arc-20160816; b=LiZL24sS/lsZTwGfQLZXIgleFBDNkplRoaOgUEs+QxcKY/kClh7eNMaU7y3SrbQUEF lQvve0ZnxmiH2lna4TITNEdle3JYRI/3BLiYRcNQ8Prq78/jjS427qj2rhiz+LOhgeoz N2U4k4FYDQ4KiBLVaDtDGPzGW8ZOnqfwb4DzhnMQEk5nKr9f87xvLoPQRagt3NMmDtRe O9kelWiiP9O9Ou99FdOEYsQf41JbOz+EtkCV15RFPfSEHqBjXP3SOoJiTkvz9Yn4hx1J 1l0GFhT5QpbTKb9tI6Cy1iezTzDqt+r9SAak3dpsnAgJTxTQTStCyBUGqgL92OcTaxNq PMag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:cc:references:to:subject:arc-authentication-results; bh=rQijEGEOgR5rQD76jSnO8kqhGec1m/jPaheeblrJJPg=; b=pYNotnVyVBF0Nk4xM49FgTIK6B+wZ9bKWFI/4ZhMsLL2CmwLlmop1YzOZJvTi/GKPM eT9Hbn73WTAQ+QfYxyydO6oaPoWTzL7o/VDEiopOZ/4y90Ox1LTJnlXmMXpzDn4ONwvQ /iyP7QXCICOgncOuTGBt8Az0b5osLXT3vidBrKi8ML6NM4ptsvSHsCDoK106+2I6ZhwK AXaGroWrsGHNLs8mhLJ6c+e4yaSElWAgkreD5xA60TPaW4ohi87OrDpJX0qbhujfdRA8 JnExRk7CSA+4finrPmxjxaWNlLYPTntsbgoZl/2XSX2ud5DEz3QogbfgS4pOsXHdApxG uTMQ== 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 a4si9850026pgn.327.2018.03.06.05.54.14; Tue, 06 Mar 2018 05:54:34 -0800 (PST) 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 S1753542AbeCFNwr (ORCPT + 99 others); Tue, 6 Mar 2018 08:52:47 -0500 Received: from mga09.intel.com ([134.134.136.24]:18094 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753075AbeCFNwq (ORCPT ); Tue, 6 Mar 2018 08:52:46 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2018 05:52:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,431,1515484800"; d="scan'208";a="35016997" Received: from mbmacphe-mobl.amr.corp.intel.com (HELO [10.254.80.80]) ([10.254.80.80]) by fmsmga004.fm.intel.com with ESMTP; 06 Mar 2018 05:52:45 -0800 Subject: Re: [RFC, PATCH 19/22] x86/mm: Implement free_encrypt_page() To: "Kirill A. Shutemov" References: <20180305162610.37510-1-kirill.shutemov@linux.intel.com> <20180305162610.37510-20-kirill.shutemov@linux.intel.com> <20180306085412.vkgheeya24dze53t@node.shutemov.name> Cc: "Kirill A. Shutemov" , Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Tom Lendacky , Kai Huang , linux-kernel@vger.kernel.org, linux-mm@kvack.org From: Dave Hansen Message-ID: <64d11e65-76b7-4e70-553c-009263b50a1c@intel.com> Date: Tue, 6 Mar 2018 05:52:44 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180306085412.vkgheeya24dze53t@node.shutemov.name> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/06/2018 12:54 AM, Kirill A. Shutemov wrote: >> Have you measured how slow this is? > No, I have not. It would be handy to do this. I *think* you can do it on normal hardware, even if it does not have "real" support for memory encryption. Just don't set the encryption bits in the PTEs but go through all the motions of cache flushing. I think that will help tell us whether this is a really specialized thing a la hugetlbfs or whether it's something we really want to support as a first-class citizen in the VM.