Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1956111pxb; Mon, 12 Apr 2021 10:29:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTkfUpNu0YeOY74FmR/Hn16ZdbwzZubTaloKQqTa3IF7VNoCbA3bPMj7VpUhyIn2vt3QEA X-Received: by 2002:a17:907:9485:: with SMTP id dm5mr6130509ejc.194.1618248546247; Mon, 12 Apr 2021 10:29:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618248546; cv=none; d=google.com; s=arc-20160816; b=RhNhLsum1ZFBXxLtLhYA6b8H7FzDP847mlvoNp6NRTDLeMgO6C6dBsfwtwYX/srs3P Mx1XTJaXnnnJdLT2c4EyyugC/AsrI3VhxJqWOQD4RnLICB99uKYEVHt9mxeFbZ0q/+g2 /s8zIJUr7+MLNhu0hPlmJSagn+MGvUvIckqE3Ag3I9Pf6boOrlpQefYrXDv3WS/P+Q8k jIgzFNbsh944jcQTsbK5WOHGY6xxUeAoeMqfrxYFIROLWmZFkws3ed+QxPP6uv+upVpZ 537xNFDic9o7MUMM6Abe6JKr1/UsNM3aXcSL1D0nzANkO+tMwFE7scQ28nRkvV2Xwhcp 4x3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=wsoHiH3lUM15pmvDC/yVK68gfG2gY8C/mzb2TrzRVIg=; b=YADmjTWY5aHlrY/bUZkOZ8bB0F9kg6X47svkxuJ9tkZVhfSAsVLzWTsp1pFSCnSOyY B4SHN1s0dGfmupy4A6Oz5w2egDvVhjYBnvLEQh9oiZ8vZh6JBN+qrWSaQNJHkPDU9II6 J/l0ri7+Swxemnrf872MYmP8NpEdCwACOBeGVLnYFT8NFfju5G9uyxHYdmh2N5CVpC9w LMjpvpRFIujNR+M4cJr1NxVvcJNNOxeDTux8Ri7M6Ky2q6SPInqORVS88zclAjL5qONv UqwZMDvgnC1cf1G9v+fDUDiinabEqrXmeb5mhvPMmzUeooh+npRNcy+ITsBYuuyy/pHw VpKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=HfEaOFR+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q6si8181885ejn.153.2021.04.12.10.28.42; Mon, 12 Apr 2021 10:29:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel-com.20150623.gappssmtp.com header.s=20150623 header.b=HfEaOFR+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244082AbhDLRY6 (ORCPT + 99 others); Mon, 12 Apr 2021 13:24:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243362AbhDLRY5 (ORCPT ); Mon, 12 Apr 2021 13:24:57 -0400 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FBC4C06174A for ; Mon, 12 Apr 2021 10:24:38 -0700 (PDT) Received: by mail-ej1-x62f.google.com with SMTP id n2so21539799ejy.7 for ; Mon, 12 Apr 2021 10:24:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wsoHiH3lUM15pmvDC/yVK68gfG2gY8C/mzb2TrzRVIg=; b=HfEaOFR+ILIfElMp8c7qI2aVrkU6BOk9zMD48pmVJsxQlxe54dQDN3ARURZciD/rSd xn0p++v7JeFgOM8igTuF4zzu+LVTIyW7X6QcMLNcn9ZmnSIf7xLODQ9LxiTIhPZ2lmWC 2MjzM2hRrISNQ8LHIx1T3DL9/JmZBWsKFDOtF3lG5xIqXhpnsbS7m4ybt1+djzGkWq5t S5cJ3xjt6zhvmEb5BK1k8FeOphNJITnlq1Q1DsaSqKa6MDy3Z509Mm7NQtgDcc56uL/X AVqw9UPKa98CxaqMYfVEWdb755TOwXcXNH8ACefrulCPuYWpVyuWDB1uyJQCBaADuRfD PZxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wsoHiH3lUM15pmvDC/yVK68gfG2gY8C/mzb2TrzRVIg=; b=DlT2pdpDFFUg1qUIXBy2yprDqztp4iR2k3jLVIbImuCnXk9epyNYH6kR1LjJ97Uday kKKWtgW5Y7/PXzNLR5BaLDXlcVg/lYXSHSy0C+FntT+qIbPJRHMswwwOoMxsnjTNV8P+ rYKOGEDT0RF0zJE3HxkRWu0gEEkESu7Rr/MWowWOnu9E51GmsJ0G7iTs3X/t6B7UBpLu Vispzm+a6cYvhD0MPo1K4qzTiO6pqQT/3+9AcAC0ZX0vNdpXBYRF2oBZF/Oog4rgK5WE TgzxCC4zFW4IY1mQNMF5lbKx3nuqmNYGu+HNJg3Xm8PbcfFyOh0BrEGxLt54vJO4WA+2 bB3Q== X-Gm-Message-State: AOAM533IlOIyWmYTsXIIV/nPHxgnGUJqagBR3cD1ti+x9/NtjiQ5DglL 4pRkVvmxeS/LELNsABxc2l6TTWnFuuuQAcwhxEn4CQ== X-Received: by 2002:a17:907:7631:: with SMTP id jy17mr3006235ejc.418.1618248277407; Mon, 12 Apr 2021 10:24:37 -0700 (PDT) MIME-Version: 1.0 References: <2f386325-58f5-6f4d-060e-f0261b6f19ee@intel.com> In-Reply-To: <2f386325-58f5-6f4d-060e-f0261b6f19ee@intel.com> From: Dan Williams Date: Mon, 12 Apr 2021 10:24:32 -0700 Message-ID: Subject: Re: [RFC v1 00/26] Add TDX Guest Support To: Dave Hansen Cc: Kuppuswamy Sathyanarayanan , Peter Zijlstra , Andy Lutomirski , Andi Kleen , Kirill Shutemov , Kuppuswamy Sathyanarayanan , Raj Ashok , Sean Christopherson , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 4, 2021 at 8:02 AM Dave Hansen wrote: > > It occurred to me that I've been doing a lot of digging in the TDX spec > lately. I think we can all agree that the "Architecture Specification" > is not the world's easiest, most disgestable reading. It's hard to > figure out what the Linux relation to the spec is. > > One bit of Documentation we need for TDX is a description of the memory > states. For instance, it would be nice to spell out the different > classes of memory, how they are selected, who selects them, and who > enforces the selection. What faults are generated on each type and who > can induce those? > > For instance: > > TD-Private memory is selected by the Shared/Private bit in Present=1 > guest PTEs. When the hardware page walker sees that bit, it walk the > secure EPT. The secure EPT entries can only be written by the TDX > module, although they are written at the request of the VMM. The TDX > module enforces rules like ensuring that the memory mapped by secure EPT > is not mapped multiple times. The VMM can remove entries. From the > guest perspective, all private memory accesses are either successful, or > result in a #VE. Private memory access does not cause VMExits. > > Would that be useful to folks? That paragraph was useful for me as someone coming in cold to TDX patch review. +1 for more of that style of commentary.