Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2818690imm; Fri, 20 Jul 2018 05:36:33 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdx98iQP5uIfAE+0+9jIJ6NHtxme+V2B66DBrifjA+7UPeQgUI/HE4xB73wzp2lWBKYoQeR X-Received: by 2002:a17:902:b401:: with SMTP id x1-v6mr1960985plr.236.1532090193527; Fri, 20 Jul 2018 05:36:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1532090193; cv=none; d=google.com; s=arc-20160816; b=y9WOUXisG9fbXRYgqXcad3T01zbWi1IRkPPfDnDtJlsPy6M4Li5rThQY2p/l8sW5Mm x50N++QpPRImXCcG6PtppdneDKg7DKDOPW77vtat0O/qtH+7gDDtdEgRE5uZVe12xcv4 Swjspxh0qIpuxTel0l1gz7k2a0NUuJ6x7gkkm0aVvfr4FxNYkQe/0QC37YNb8CysZezn J1521I+xZsY0660SScNjpPYgGq2A8gugRQeBnhrEo25MBi3ZnSQOsv9U6aBdg/iNaUxl b3rwWqZmrVUs8I0jSm63KpBFfAAlIl8duDseAAn4zaNf0gsOuAs8FsIlGzI2Uzto8IIw GT0g== 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=Ne/2zHMtQRSo/Lsg4s82GtCBfv4jU5VHrzHhPF06vdc=; b=EUl7/F+RM4wbw1HTR8cH41sZE6g2sh3kSvxwsGZfx6TtJvAmQiOJ2T0XX0tW4YUvij gjQPWEqQzrzAfyPGPS6ywuoqNDBDh4YqP9lBQnW/chpeY1oWCtiQ19Ye1H8ndLLWU45y OH6haC1KBlw45oK33Bd4imsyFkHKcRz9A+ODvDi8AWfU3kbRZjnqEzb60BnQ/rTwcuM9 ZOtzFpoCHx3hPV91PtBR0hifae3kAvRQSjRDSp4pUeRsFJ0/QBPn7v1HEhuoKa/bKxO1 +J87y4qSjsIoPe/w6h0C8KhvsMeItbW3RzVaCVIPyLm0yVhGDtCmy2qs5fhtg1d+8h8e yL6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@shutemov-name.20150623.gappssmtp.com header.s=20150623 header.b=Mw6+RLNT; 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 l18-v6si1750691pgg.152.2018.07.20.05.36.19; Fri, 20 Jul 2018 05:36:33 -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=Mw6+RLNT; 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 S2388889AbeGTNXA (ORCPT + 99 others); Fri, 20 Jul 2018 09:23:00 -0400 Received: from mail-pl0-f65.google.com ([209.85.160.65]:39275 "EHLO mail-pl0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388411AbeGTNXA (ORCPT ); Fri, 20 Jul 2018 09:23:00 -0400 Received: by mail-pl0-f65.google.com with SMTP id m1-v6so158665plt.6 for ; Fri, 20 Jul 2018 05:34:57 -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=Ne/2zHMtQRSo/Lsg4s82GtCBfv4jU5VHrzHhPF06vdc=; b=Mw6+RLNTjXbzv9DEH4DahTtO3URLjXF+ExOma1UlENN3qjWrR3p4wuYMhtsXahLcru HYKhPo/ZS7zpMgwDs3Q5AU7lMKB/HHFyGmF4YzR+LM+QyRbiOnJkgfPX+cVTauRSD16n HU590B7+CJqCnwk0o2UKpRCmwc2Z4ZPuE18pLse8Ze9YPkTmMj4PDsAzLzidQRoo0Oro Md5WNI7f9eDuNYA9p2CH+7DeP2rZWQuN8IUa/5IyFbeHj4pfgtk5E6hl6Yr/ZttK0RNC Zur9awFGx4pGFCcBtvSzwfPG2qDG9niK3hjK0ywIP2yNjgPq2qr6ebHxI5n/O4s145Si Oj2w== 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=Ne/2zHMtQRSo/Lsg4s82GtCBfv4jU5VHrzHhPF06vdc=; b=sSr+ovIHbtdrogWSiIxaofS0ecoEO8wf6L4grIl4oFI5ql8f9dxsL+KgqZJnZqHLww hJRM2RRnXKwDLHfiW1P+Mbp0PLg/TarLhXCB3LRdoGGLi0kzFnH5IlsRBv+cBzgGgJBJ IQPTvVykcYuIulkWn/UV4Jpsc1e4MWrPM0fqDsV671+ICF4F6jqIr7AMVlSKpaH8FdMC YQCdCp9UazjOrj7P5knHfbgPzAoJQNhpV4MW8nrG+bmuIrP5wJQJbZenJ0unUqTIFqc1 ug0KWc+W1glzzT0CqoudDTNfDQHTCNSTBN+qWQjlLdI6P7sWe3JOdAQCoQO2bwgg0nGv jK5w== X-Gm-Message-State: AOUpUlFuYdKAs/v/fxSN33fZ84l03KUuN3kCVZnqAbhJJFwMpmHodz/h wBtsEfl+pKV64tskxUj0HrYfQw== X-Received: by 2002:a17:902:b708:: with SMTP id d8-v6mr1962621pls.184.1532090097644; Fri, 20 Jul 2018 05:34:57 -0700 (PDT) Received: from kshutemo-mobl1.localdomain ([134.134.139.83]) by smtp.gmail.com with ESMTPSA id g16-v6sm3100411pfe.88.2018.07.20.05.34.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 20 Jul 2018 05:34:57 -0700 (PDT) Received: by kshutemo-mobl1.localdomain (Postfix, from userid 1000) id 9852C300254; Fri, 20 Jul 2018 15:34:53 +0300 (+03) Date: Fri, 20 Jul 2018 15:34:53 +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 , Jacob Pan , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv5 08/19] x86/mm: Introduce variables to store number, shift and mask of KeyIDs Message-ID: <20180720123453.sqz6w5ihaw7gvnoo@kshutemo-mobl1> References: <20180717112029.42378-1-kirill.shutemov@linux.intel.com> <20180717112029.42378-9-kirill.shutemov@linux.intel.com> <1edc05b0-8371-807e-7cfa-6e8f61ee9b70@intel.com> <20180719102130.b4f6b6v5wg3modtc@kshutemo-mobl1> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180622 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 19, 2018 at 07:23:27AM -0700, Dave Hansen wrote: > On 07/19/2018 03:21 AM, Kirill A. Shutemov wrote: > > On Wed, Jul 18, 2018 at 04:19:10PM -0700, Dave Hansen wrote: > >> On 07/17/2018 04:20 AM, Kirill A. Shutemov wrote: > >>> mktme_nr_keyids holds number of KeyIDs available for MKTME, excluding > >>> KeyID zero which used by TME. MKTME KeyIDs start from 1. > >>> > >>> mktme_keyid_shift holds shift of KeyID within physical address. > >> I know what all these words mean, but the combination of them makes no > >> sense to me. I still don't know what the variable does after reading this. > >> > >> Is this the lowest bit in the physical address which is used for the > >> KeyID? How many bits you must shift up a KeyID to get to the location > >> at which it can be masked into the physical address? > > Right. > > > > I'm not sure what is not clear from the description. It look fine to me. > > Well, OK, I guess I can write a better one for you. > > "Position in the PTE of the lowest bit of the KeyID" > > It's also a name that could use some love (now that I know what it > does). mktme_keyid_pte_shift would be much better. Or > mktme_keyid_low_pte_bit. Okay, thanks. -- Kirill A. Shutemov