Received: by 10.223.185.116 with SMTP id b49csp3855294wrg; Tue, 6 Mar 2018 06:11:18 -0800 (PST) X-Google-Smtp-Source: AG47ELsblLAYoJMSs5kp1FfXfTM0PQFrg7/2uXaPqIXYyP90M+HfHLhnVmkcPbJ9d7NJTIaESxCd X-Received: by 2002:a17:902:7c84:: with SMTP id y4-v6mr16675891pll.305.1520345478081; Tue, 06 Mar 2018 06:11:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520345478; cv=none; d=google.com; s=arc-20160816; b=zetpTtiRQFxMtw+6zMdVYxA6vrtzgl8lrAe6WzOzdLOgciJqLyPq8DwobZq96Gswz3 Dsfl2hif9uTh1PCFU914bfU8zD80FL1edn+BdHAQ2ggFfSCwHNBfjLi+ca0GC0aNq8EC K2fZilQR2zl5GzufNbGx/jgrk+yQcdaOz1kOQZJ5DApJ/0T5WCjCdjm5oJakiLAPnz89 HP/QI89jNmPDlS5VwS4p//SCiv6S9Us3eQpSpnYMMk6ujz+h7DKMi7JKqJ0I9yUYIdVU XqUHR6vh9vBVPLOIjjmTg5FYERloq1RMFZ4n7OA/dCnr99wKFcoztO/n9z+/Ydtbaedi 8NDA== 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=FC87kzWKfiBfYFr5JHDdXkofw7cfc4HAIuAKf9KAqWc=; b=nC1mBgSrvePC3ghZkuFj2FyEmm+1GjZsOT59NI3YuSU6SvoQudBSln4t0dssrPHCfO aOMqkNkv26TaB4ez3cmYJq2kuGnqELOTW5HWrUDphOhq10pBMDPsHDfqHle9GIm9Yl/A lmvQpNEV/mNmJ7Zao3ZdAsodPdQp1KdAFfPBktcUFX5Uxt3CqW/4O67FCEeESg4dfi1u pwPzZZ4Yy1l6GM5v+3clBnhPI+Cc65DSZ4aIok+lgEW9kKmXTQsbIEe01KlJtWuxfWFX 7B8nBDpANisO0CC79O8beeB+MDmSEAG4q2bPC0k2cuBc4JsUlPagSumgs+35TOL3dkQY LyoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=wwzGilWa; 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 a12si4240419pgu.501.2018.03.06.06.11.04; Tue, 06 Mar 2018 06:11:18 -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; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=wwzGilWa; 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 S1753652AbeCFOJx (ORCPT + 99 others); Tue, 6 Mar 2018 09:09:53 -0500 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33319 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753069AbeCFOJu (ORCPT ); Tue, 6 Mar 2018 09:09:50 -0500 Received: by mail-wm0-f66.google.com with SMTP id s206so18189375wme.0 for ; Tue, 06 Mar 2018 06:09:49 -0800 (PST) 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=FC87kzWKfiBfYFr5JHDdXkofw7cfc4HAIuAKf9KAqWc=; b=wwzGilWarbCCoZMk9SVA7yb9ej1hqJd9pt7OK6F7nRnRtesA6lvqFUEotrBFCbys54 lyHUM3DgOeem7sE0zXf3ukFvh1q1ElbU9nOPCyzXw+xOHh6ZoEegwCFRz9d0BE9IlO69 xb37Ps11evLzkW3poHnzR2HdxPX7NBsj3AQe+d1UllWhV4D66sTaeVsLv5LH0HWlB92c tetT8LdTB4UqkfTi1UzHC6ZkBmxjWNSC5YVz8BgsZzFJpT5Djbjk+Rjnpt+ufC4UH9Vw 29KhnKMMGbDBWflOC9u7wgJMc50DTS7PvoKPH9v0SwtbZn+HzU43nA4J6+7tKgyyBrHT Se1w== 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=FC87kzWKfiBfYFr5JHDdXkofw7cfc4HAIuAKf9KAqWc=; b=tTEZ1YCtRlMxWtxcpEl1QgazF1ckToOf3uht23qrTp2Of22ZXf1oqgrOEZD5LXarv2 wqpsX/4/GDj2UblSftNm7eF7RV7eTJa/G9XYx9c7KbJgtTrtFp0nDgLQ7O6kP7b7YiBO 0LaSpmfiuEex8ygFl5pIyxWO3OK9jnWN6RZPMajjF8DQiubgtNlZT1/OX7eZnh+w4onr kQNaesyeJ22/c11m4ECuV8bO8yvEZQxf3zkrYa6ZHj7KQnFJBY3PxAWNznQ2+Rw6XjCK T4Ry1eMGsH4v0cbe2gqNn+dXDKnVIE9tfEeW8cHdpxWfnBFl6XVfN3mZcFZt9lMnFGB9 rTlw== X-Gm-Message-State: APf1xPDajXm2NGb5+aZMk9UQSfI5O36DPIlR/0nli8pC3/SioFawzJpu wd8WrxJUWyj+J0E4MNjknkJWww== X-Received: by 10.80.191.4 with SMTP id f4mr23565857edk.224.1520345388549; Tue, 06 Mar 2018 06:09:48 -0800 (PST) Received: from node.shutemov.name ([86.57.210.234]) by smtp.gmail.com with ESMTPSA id e29sm14326756edj.66.2018.03.06.06.09.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Mar 2018 06:09:47 -0800 (PST) Received: by node.shutemov.name (Postfix, from userid 1000) id E70E6648D520; Tue, 6 Mar 2018 17:09:32 +0300 (+03) Date: Tue, 6 Mar 2018 17:09:32 +0300 From: "Kirill A. Shutemov" To: Dave Hansen 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 Subject: Re: [RFC, PATCH 19/22] x86/mm: Implement free_encrypt_page() Message-ID: <20180306140932.bdll5vh6qzyydqg4@node.shutemov.name> References: <20180305162610.37510-1-kirill.shutemov@linux.intel.com> <20180305162610.37510-20-kirill.shutemov@linux.intel.com> <20180306085412.vkgheeya24dze53t@node.shutemov.name> <64d11e65-76b7-4e70-553c-009263b50a1c@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <64d11e65-76b7-4e70-553c-009263b50a1c@intel.com> User-Agent: NeoMutt/20180223 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 06, 2018 at 05:52:44AM -0800, Dave Hansen wrote: > 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. Yes, allocation/freeing and KeyID interfaces can be tested with MKTME support in hardware. I did most of my testing this way. > 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. I will benchmark this. But not right now. -- Kirill A. Shutemov