Received: by 10.223.185.116 with SMTP id b49csp221594wrg; Tue, 13 Feb 2018 20:22:18 -0800 (PST) X-Google-Smtp-Source: AH8x224TRP11ugTxFSRE3J4aFjHwYO4ljijt+lQQ5mqMykHIzi6JYpmekq/fc2W02J0gf1/CpACE X-Received: by 10.98.163.15 with SMTP id s15mr3483984pfe.67.1518582138202; Tue, 13 Feb 2018 20:22:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518582138; cv=none; d=google.com; s=arc-20160816; b=rbLMlgYRnaseTfGvOGAMu4XlNEFzXJYcZL7ivvoaR45n93uIuFO/CCFbRqw2Q5OZmL ayYJfzmFMckYzj/hLxPfPSMlJ3VQF3ko084i7BySLMBjXIdsz2iAs6cDmXrLrk33X0hC UcaRfws7yxgUfI7XoQfUBhdEuSiBlAtRFtIih7Fhxd91ouo6t6j99Y2VRlYMd2YEjdNV h7P5GMrmD32/Ny1uWkcjaNDhXZDIutIJ+3QHtUjMkoIV7ZSYhc3Bfwd4LQtU2sTRCrvA dmTxe+wW4DG9Zlch3FjHp4LxaedtxS+qobUtGiaYnfLXQrPLJ5sAysvvSsy1SwxzflLo ioEA== 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=9rR9GOBkDrenL3tf0QTDyDISuHp/qqd82ExxlZv9CPA=; b=ak1EPIQLwu8GH2WWZbCo0SW4ELItIxtPauircUGPxEofWkfY8qlkWw3PG2P/oe46m2 Z3GNecqAb20hRJAUvuLwfrWSF2Mbs5HGOZ+r7afsakvYhvBUW14SzI77Rwq4V+eB7JJK K7vqG307F8X6NEM6bgS/KNloqUl5tFOAi/y6GFpKIZ/koztrLTyEqfBwAQ9+pv9Xk/Hb SkOUTWRhvNeQuf1tooZtJ7y36oTsPEtbJdUdkBjuI//19BWlh1tNy9ca590GSNbzqUqs SWxO3DsIwZflu0kwkfQ0Oeu3QqZctSltBUHZUPHwvEtWIEEa9mZCuvobFnIa/HUyOGnv ctMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=V3z82Yhq; 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 16si2014884pgf.181.2018.02.13.20.22.03; Tue, 13 Feb 2018 20:22: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=V3z82Yhq; 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 S966814AbeBNEV0 (ORCPT + 99 others); Tue, 13 Feb 2018 23:21:26 -0500 Received: from mail-wm0-f44.google.com ([74.125.82.44]:52852 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966705AbeBNEVY (ORCPT ); Tue, 13 Feb 2018 23:21:24 -0500 Received: by mail-wm0-f44.google.com with SMTP id j199so7835859wmj.2 for ; Tue, 13 Feb 2018 20:21:24 -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=9rR9GOBkDrenL3tf0QTDyDISuHp/qqd82ExxlZv9CPA=; b=V3z82Yhqp8OBnRzunbUm3oT/XHndytQFCwUefMvzCXWqXGSNXoSZ/iUC2IOKXPeGTt WewLztdhfUoLC7Buu3cqPpwMc9xiilCJu2MfiRlGKVwyjWUt7ydI6/j8t5BWtBrr4FYb t9f3chmd3kpln1pHdklGAR4i7vgI/SWKbJ1JiIXYdwhgSoevMiD1f/e0KhjrnSz4IX4y CXvCVzpvCd+MYCH/S2quMo9Y7Uq4ch3ro1t7X18tTDOkAfrbvBNUL5gwQTCh16kK+iVw C2lU0Cidq6Zgmxigefp0PUx2pmWIUqABPVqmHW8/FIXORgJ1qA14aMWDuaEwq5ok1z1l LWCA== 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=9rR9GOBkDrenL3tf0QTDyDISuHp/qqd82ExxlZv9CPA=; b=CC1JJoRkYjYTpufezZ5/3/k59I8kvBepv+7xbeUugOCOYPZXfZJyPL5LQF/HnB2CKf 4a2TeSt8hFZCpC+tHByGpFjUnmoanu6VoeDE1NBEyCICla4ARnpiERBk3YeqR6qA3HXv aUTBstdXjvP0qhwLRjw9eKFhYLI/hHPlMYPuqvRPuP+NUzAitb+xiOmNABJ68lcWkmi9 8MIgTABLjX0cSWpSbMVP5GXd66yNB1HHht4OIfunEtC3dpoIHv7JdDEavlg7OycKO9Up wIoANBE5FBr9sxtLb/+TuXlJbB4xTwKCLCi/L3MgKacUiSj2Qjk31AQAVIU0WH9K7Ztu /Q2A== X-Gm-Message-State: APf1xPBsmD+exOzrI/U8I7O8Tsh3ADftnWW/KFo/MVBXUFExeq1cQCmh 1KToQsHa1pLmx6zYn6tz1mJCsXUm X-Received: by 10.80.164.13 with SMTP id u13mr5155716edb.282.1518582083586; Tue, 13 Feb 2018 20:21:23 -0800 (PST) Received: from node.shutemov.name ([178.121.192.223]) by smtp.gmail.com with ESMTPSA id a5sm8518900eda.56.2018.02.13.20.21.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Feb 2018 20:21:22 -0800 (PST) Received: by node.shutemov.name (Postfix, from userid 1000) id DDC12648D520; Wed, 14 Feb 2018 07:21:21 +0300 (+03) Date: Wed, 14 Feb 2018 07:21:21 +0300 From: "Kirill A. Shutemov" To: Tom Lendacky Cc: "Kirill A. Shutemov" , Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Dave Hansen , Kai Huang , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86/mm: Decouple dynamic __PHYSICAL_MASK from AMD SME Message-ID: <20180214042121.tza3cpvrnpztjeme@node.shutemov.name> References: <20180208125524.88795-1-kirill.shutemov@linux.intel.com> <5199949d-6795-aa55-888c-7ba8abd406e2@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5199949d-6795-aa55-888c-7ba8abd406e2@amd.com> User-Agent: NeoMutt/20171215 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 13, 2018 at 10:10:22PM -0600, Tom Lendacky wrote: > On 2/8/2018 6:55 AM, Kirill A. Shutemov wrote: > > AMD SME claims one bit from physical address to indicate whether the > > page is encrypted or not. To achieve that we clear out the bit from > > __PHYSICAL_MASK. > > I was actually working on a suggestion by Linus to use one of the software > page table bits to indicate encryption and translate that to the hardware > bit when writing the actual page table entry. With that, __PHYSICAL_MASK > would go back to its original definition. But you would need to mask it on reading of pfn from page table entry, right? I expect it to have more overhead than this one. And software bits are valuable. Do we still have a spare one for this? -- Kirill A. Shutemov