Received: by 10.223.185.116 with SMTP id b49csp2820763wrg; Mon, 5 Mar 2018 09:10:35 -0800 (PST) X-Google-Smtp-Source: AG47ELuPvKTsB6NEbD+VJ+0HwsgM5j0rRMkZObcr32j8DYrevkA9CvT6QM3MbVyBu4MhI0R/cFrw X-Received: by 2002:a17:902:6717:: with SMTP id f23-v6mr6029860plk.188.1520269835257; Mon, 05 Mar 2018 09:10:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520269835; cv=none; d=google.com; s=arc-20160816; b=qFhzxUTwYgCYDuZRSXYrqzpm4WB0ugdyoae43v5sXMBKqAn7inrqZoPRxiVDXVU9pN 4kb436m3D5TlkjJV8aSPtfCeu0RTjoCSo5t6YF8FRrILXXsEf+0REbK5FSDH2dYL2ad2 BjxEACkXyEkAV78Rra5HDdpYK6//SihcqHh6PLq0zBnUqV/DcSFGjUhJa/vKbesJV2td 1JnqclADKWuhrbaUfM2jxibgGVpUeOLgyZTaLudvWBK18fRDGAvZh4pRNOehTGdPooke 3iTW4cBb3wUjVD682dOFLt1AgJUzfI9QKa3CYwhDg8bQCCGinbK7fqLpUhnIERBnDFWY FcNA== 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=oH2Q0E4f2bVisCo+vxjyf6ocbofUkobrDN6JpDwef8I=; b=ppONksWyBtcfLFu0xHRuHAMogHEipUmuKkjNuc/tBge4kqIcft2tmk3RLhYRlz4pIB S01PIkCkEusssDTAEGebUbEuTDOI+zx9rWR583M+k9T+JjCHmyq5EvocMd5Hc+Z1mkTp 2hC7nngW8NPIvl9oSVwF208ohbO5O2Bd9RoAGZJVokjHL9ShYjGln0sn7KuCZLWg/ulW Fn8cBOYK4ZspevCpyuoMvwzusWRelNTGuwZ76XgvB+dOlqJLwyWtJiZ2uS7yqM+PCpe1 rAerndomBo6jMJHUdDnH13QOb+KxjJs/kTU+7gc6O7BKy0sIsFMS5vR560Gv8qhPfrkx NqEQ== 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 u86si10407399pfa.69.2018.03.05.09.10.19; Mon, 05 Mar 2018 09:10:35 -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 S1751880AbeCERI4 (ORCPT + 99 others); Mon, 5 Mar 2018 12:08:56 -0500 Received: from mga09.intel.com ([134.134.136.24]:21300 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751275AbeCERIz (ORCPT ); Mon, 5 Mar 2018 12:08:55 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Mar 2018 09:08:54 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,427,1515484800"; d="scan'208";a="23077651" Received: from ray.jf.intel.com (HELO [10.24.8.152]) ([10.24.8.152]) by orsmga006.jf.intel.com with ESMTP; 05 Mar 2018 09:08:54 -0800 Subject: Re: [RFC, PATCH 21/22] x86/mm: Introduce page_keyid() and page_encrypted() To: "Kirill A. Shutemov" , Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Tom Lendacky References: <20180305162610.37510-1-kirill.shutemov@linux.intel.com> <20180305162610.37510-22-kirill.shutemov@linux.intel.com> Cc: Kai Huang , linux-kernel@vger.kernel.org, linux-mm@kvack.org From: Dave Hansen Message-ID: <61041640-435e-1a67-177f-a75791130514@intel.com> Date: Mon, 5 Mar 2018 09:08:53 -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: <20180305162610.37510-22-kirill.shutemov@linux.intel.com> 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/05/2018 08:26 AM, Kirill A. Shutemov wrote: > +static inline bool page_encrypted(struct page *page) > +{ > + /* All pages with non-zero KeyID are encrypted */ > + return page_keyid(page) != 0; > +} Is this true? I thought there was a KEYID_NO_ENCRYPT "Do not encrypt memory when this KeyID is in use." Is that really only limited to key 0.