From patchwork Sat Jul 9 04:20:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bagas Sanjaya X-Patchwork-Id: 12912069 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D411CCA480 for ; Sat, 9 Jul 2022 04:21:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229651AbiGIEVb (ORCPT ); Sat, 9 Jul 2022 00:21:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53286 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbiGIEVU (ORCPT ); Sat, 9 Jul 2022 00:21:20 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 98E054E62D; Fri, 8 Jul 2022 21:21:18 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id bf13so502424pgb.11; Fri, 08 Jul 2022 21:21:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/tviZ2LRFnFmh3Cs62ruUhDOZv+z4gBr/FE1h1tyxLU=; b=mOxcJUxnainQ5bKetB7G+ZJ6+yIcH8PCSKOG7/pJRAT2G3Ow5x3deGS0MPZF+0hWZR jclwFl0XjL98iS6PbKJT/okl683m2Ik1SeV1L72lXI7TvaF10IDxSAfkM96Zvkoh0bdw 6p5mtSs0n9tjePKexVMclXVAhHf3Iy2eHIvdhGtEPRWEBdr9FdDCHHDiZXTyYsz9t7Am 40Y2HzF8vRjeboVTU8IiV2SpGMxFEDQgga+AgKgp+Nw8n0a9VP3qy22BsanFR9soY5BT 9pVoUHQD8ICrQM7dIerO44Ms3ZO31PdU7vc25gez6/+trOcT+6ASZlbCpjU2NyYFsslg LuXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/tviZ2LRFnFmh3Cs62ruUhDOZv+z4gBr/FE1h1tyxLU=; b=TrLOsU9CGtHYU4Fy/q8FRHBqHlB0dBIWRliiOU8gWjmW2Ixm/AOp27goVP/+AO+DGc NN0R2+VJfJgS2qEYYzGKTUu+NxhsYeJMJmlIOBKSa7ONRpc4DV+KZEzj3LeXK5U/EYrX W87O/5du/Yw/6y7kdbQspXaCFBJ/ABlWj9nrg8Y33FVlPj2ZOt0uKhUicvihq1ebSUc7 Y88p7mIBViLMsK2HqL2sDWnZ5bKNV/WzcAs7H63nLmq4qxQz1Z1FMmiuqj481hXAosKU YRUM8aWSVgZWWFySHwq+r3NrUZC9SKVkhQFsFfOe1aURvOp+cXC4sc8ZlhMuhHJzWcVp qIdg== X-Gm-Message-State: AJIora+hoxR6J7D8CaDuD9r3bwlaq4p6sWMXVeZ8AFJ6MMNQCgHte70K R3yxdH4GLcU0up+JVqmns6M= X-Google-Smtp-Source: AGRyM1vTTVe4PNr9mzzGhFXCNTP1sr972UzfMOiMjPjlkQxhWgVC7KrxtdGf1V+0K3oJfU0UeS1kvQ== X-Received: by 2002:a05:6a00:1349:b0:527:f7a2:b3e9 with SMTP id k9-20020a056a00134900b00527f7a2b3e9mr6995272pfu.45.1657340478069; Fri, 08 Jul 2022 21:21:18 -0700 (PDT) Received: from debian.me (subs02-180-214-232-88.three.co.id. [180.214.232.88]) by smtp.gmail.com with ESMTPSA id gl19-20020a17090b121300b001f0097c2fb2sm244073pjb.28.2022.07.08.21.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 21:21:15 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id 3E2D410394E; Sat, 9 Jul 2022 11:21:10 +0700 (WIB) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Isaku Yamahata , Kai Huang , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Bagas Sanjaya , kernel test robot Subject: [PATCH 01/12] Documentation: kvm: Pad bullet lists with blank line Date: Sat, 9 Jul 2022 11:20:27 +0700 Message-Id: <20220709042037.21903-2-bagasdotme@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220709042037.21903-1-bagasdotme@gmail.com> References: <20220709042037.21903-1-bagasdotme@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org There are many "unexpected indentation" warnings due to missing blank line padding surrounding bullet lists. One of these are reported by kernel test robot: Documentation/virt/kvm/intel-tdx.rst:181: WARNING: Enumerated list ends without a blank line; unexpected unindent. Add the paddings. While at it, align TDX control flow list. Link: https://lore.kernel.org/linux-doc/202207050428.5xG5lJOv-lkp@intel.com/ Fixes: 9e54fa1ac03df3 ("Documentation/virtual/kvm: Document on Trust Domain Extensions(TDX)") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya --- Documentation/virt/kvm/intel-tdx.rst | 75 ++++++++++++++++++++++------ 1 file changed, 61 insertions(+), 14 deletions(-) diff --git a/Documentation/virt/kvm/intel-tdx.rst b/Documentation/virt/kvm/intel-tdx.rst index 3fae2cf9e5341d..46ad32f3248e40 100644 --- a/Documentation/virt/kvm/intel-tdx.rst +++ b/Documentation/virt/kvm/intel-tdx.rst @@ -178,26 +178,30 @@ In addition to KVM normal flow, new TDX ioctls need to be called. The control f looks like as follows. #. system wide capability check - * KVM_CAP_VM_TYPES: check if VM type is supported and if TDX_VM_TYPE is - supported. + + * KVM_CAP_VM_TYPES: check if VM type is supported and if TDX_VM_TYPE is + supported. #. creating VM - * KVM_CREATE_VM - * KVM_TDX_CAPABILITIES: query if TDX is supported on the platform. - * KVM_TDX_INIT_VM: pass TDX specific VM parameters. + + * KVM_CREATE_VM + * KVM_TDX_CAPABILITIES: query if TDX is supported on the platform. + * KVM_TDX_INIT_VM: pass TDX specific VM parameters. #. creating VCPU - * KVM_CREATE_VCPU - * KVM_TDX_INIT_VCPU: pass TDX specific VCPU parameters. + + * KVM_CREATE_VCPU + * KVM_TDX_INIT_VCPU: pass TDX specific VCPU parameters. #. initializing guest memory - * allocate guest memory and initialize page same to normal KVM case - In TDX case, parse and load TDVF into guest memory in addition. - * KVM_TDX_INIT_MEM_REGION to add and measure guest pages. - If the pages has contents above, those pages need to be added. - Otherwise the contents will be lost and guest sees zero pages. - * KVM_TDX_FINALIAZE_VM: Finalize VM and measurement - This must be after KVM_TDX_INIT_MEM_REGION. + + * allocate guest memory and initialize page same to normal KVM case + In TDX case, parse and load TDVF into guest memory in addition. + * KVM_TDX_INIT_MEM_REGION to add and measure guest pages. + If the pages has contents above, those pages need to be added. + Otherwise the contents will be lost and guest sees zero pages. + * KVM_TDX_FINALIAZE_VM: Finalize VM and measurement + This must be after KVM_TDX_INIT_MEM_REGION. #. run vcpu @@ -225,41 +229,58 @@ Several points to be considered. a centralized file is acceptable. - Wrapping kvm x86_ops: The current choice + Introduce dedicated file for arch/x86/kvm/vmx/main.c (the name, main.c, is just chosen to show main entry points for callbacks.) and wrapper functions around all the callbacks with "if (is-tdx) tdx-callback() else vmx-callback()". Pros: + - No major change in common x86 KVM code. The change is (mostly) contained under arch/x86/kvm/vmx/. - When TDX is disabled(CONFIG_INTEL_TDX_HOST=n), the overhead is optimized out. - Micro optimization by avoiding function pointer. + Cons: + - Many boiler plates in arch/x86/kvm/vmx/main.c. Alternative: + - Introduce another callback layer under arch/x86/kvm/vmx. + Pros: + - No major change in common x86 KVM code. The change is (mostly) contained under arch/x86/kvm/vmx/. - clear separation on callbacks. + Cons: + - overhead in VMX even when TDX is disabled(CONFIG_INTEL_TDX_HOST=n). - Allow per-VM kvm_x86_ops callbacks instead of global kvm_x86_ops + Pros: + - clear separation on callbacks. + Cons: + - Big change in common x86 code. - overhead in common code even when TDX is disabled(CONFIG_INTEL_TDX_HOST=n). - Introduce new directory arch/x86/kvm/tdx + Pros: + - It clarifies that TDX is different from VMX. + Cons: + - Given the level of code sharing, it complicates code sharing. KVM MMU Changes @@ -291,26 +312,38 @@ with host(if set to 1) or private to TD(if cleared to 0). = 51 or 47 bit set for TDX case. Pros: + - Large code reuse with minimal new hooks. - Execution path is same. + Cons: + - Complicates the existing code. - Repurpose kvm_mmu_page as shadow of Secure-EPT can be confusing. Alternative: + - Replace direct read/write on EPT entry with TDX-SEAM call by introducing callbacks on EPT entry. + Pros: + - Straightforward. + Cons: + - Too many touching point. - Too slow due to TDX-SEAM call. - Overhead even when TDX is disabled(CONFIG_INTEL_TDX_HOST=n). - Sprinkle "if (is-tdx)" for TDX special case + Pros: + - Straightforward. + Cons: + - The result is non-generic and ugly. - Put TDX specific logic into common KVM MMU code. @@ -320,20 +353,30 @@ Additional KVM API are needed to control TD VMs. The operations on TD VMs are specific to TDX. - Piggyback and repurpose KVM_MEMORY_ENCRYPT_OP + Although not all operation isn't memory encryption, repupose to get TDX specific ioctls. + Pros: + - No major change in common x86 KVM code. + Cons: + - The operations aren't actually memory encryption, but operations on TD VMs. Alternative: + - Introduce new ioctl for guest protection like KVM_GUEST_PROTECTION_OP and introduce subcommand for TDX. + Pros: + - Clean name. + Cons: + - One more new ioctl for guest protection. - Confusion with KVM_MEMORY_ENCRYPT_OP with KVM_GUEST_PROTECTION_OP. @@ -341,9 +384,13 @@ Alternative: KVM_MEMORY_ENCRYPT_OP as same value for user API for compatibility. "#define KVM_MEMORY_ENCRYPT_OP KVM_GUEST_PROTECTION_OP" for uapi compatibility. + Pros: + - No new ioctl with more suitable name. + Cons: + - May cause confusion to the existing user program. From patchwork Sat Jul 9 04:20:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bagas Sanjaya X-Patchwork-Id: 12912066 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 14530CCA482 for ; Sat, 9 Jul 2022 04:21:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229621AbiGIEVW (ORCPT ); Sat, 9 Jul 2022 00:21:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbiGIEVR (ORCPT ); Sat, 9 Jul 2022 00:21:17 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8E204B0E2; Fri, 8 Jul 2022 21:21:16 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id o5-20020a17090a3d4500b001ef76490983so396151pjf.2; Fri, 08 Jul 2022 21:21:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=tqnD4C4oV1Jfc5xrbTyXeGKGD2rQbMRtWvUugf25kP4=; b=LA1u9zvwL55/Z5e5xyS4ooVm/vxaZju66QhKk7a+rVrCRdEm+MVwOo4mHoollEhRg6 0ynn5jdfFthSZ6r9s39UJjtZFnhIWgJRHNWZzH9+Rct1aAB5MQVjpAmmqE4q8efSOX6p 2pBvdmhVz7sWtcXVMpdmwNSOzuX2ghHM2HCxBaJeOd7LPKhWkn4tygs+u8RRLMDnT7kU D70wWRHW9A2VB8h3J6lQN0Apvdf2Z/1L5qogxH68MYkPK7l4pcv5xnl7xODWenLO3sE4 55P//rMC+5VMDKQDeMJ7G4763pu0UaPJ67zyGb7TSVVY15rECG+JVecZLiiehGrysbao tSyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=tqnD4C4oV1Jfc5xrbTyXeGKGD2rQbMRtWvUugf25kP4=; b=pZHQ/05Ftq0fH6RrE5T20+XdkpOI0uAxiw4l0dn3HyjMQlF7HmxOFtFwFEJJ2yAX9m PScQlaqPQpk0h+NWvp4RGG9665XX3TthoVGZqjagt3kNmdM7ZNSrGDNOyiAwxsFzilb8 PoQOfgNzMAwD9/NVznRgwunns3ErbH86AFTi196Bnf79P8tsVBjaOQ3F19WLQ1JGcf0v nAV6YWVQsFgbFjIQ02RKZDf+yCpcLGZXDjQ6InC2NJ1e0MdeH/8bkw5jULhjJGiRvJXv PDdqYbnkpNc/hQpmtonkTAwVcH3uqAKrPZcs/+So1vsDYse2Si90Hy7jLacbaCG+F9+1 NfKw== X-Gm-Message-State: AJIora+8epbyR+qqEss3znyfNFrdO7fz1eY4WkLtrPA73DN6JN/Hfvc6 IppJ7y+6BqMzjO23+/angn8= X-Google-Smtp-Source: AGRyM1ti0bCsTorLAhWrXlmpFGlIs0Tk6L7syNx3SMzkw98mywxfB3uBBZrKsw/KLgdul/eZWMQeSw== X-Received: by 2002:a17:902:d4c6:b0:16c:3273:c7b3 with SMTP id o6-20020a170902d4c600b0016c3273c7b3mr1025055plg.108.1657340476187; Fri, 08 Jul 2022 21:21:16 -0700 (PDT) Received: from debian.me (subs02-180-214-232-88.three.co.id. [180.214.232.88]) by smtp.gmail.com with ESMTPSA id 15-20020a63134f000000b00412b1043f33sm253283pgt.39.2022.07.08.21.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 21:21:15 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id 272401039B9; Sat, 9 Jul 2022 11:21:10 +0700 (WIB) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Isaku Yamahata , Kai Huang , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Bagas Sanjaya Subject: [PATCH 02/12] Documentation: kvm: tdx: Use appropriate subbullet marker Date: Sat, 9 Jul 2022 11:20:28 +0700 Message-Id: <20220709042037.21903-3-bagasdotme@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220709042037.21903-1-bagasdotme@gmail.com> References: <20220709042037.21903-1-bagasdotme@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Sphinx only supports dash (-) and asterisk (*) as bullet marker. Use them instead of dot (.) and equal (=). Fixes: 9e54fa1ac03df3 ("Documentation/virtual/kvm: Document on Trust Domain Extensions(TDX)") Signed-off-by: Bagas Sanjaya --- Documentation/virt/kvm/intel-tdx.rst | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Documentation/virt/kvm/intel-tdx.rst b/Documentation/virt/kvm/intel-tdx.rst index 46ad32f3248e40..7a7c17da3a045f 100644 --- a/Documentation/virt/kvm/intel-tdx.rst +++ b/Documentation/virt/kvm/intel-tdx.rst @@ -216,15 +216,16 @@ The main issue for it is that the logic of kvm_x86_ops callbacks for TDX is different from VMX. On the other hand, the variable, kvm_x86_ops, is global single variable. Not per-VM, not per-vcpu. -Several points to be considered. - . No or minimal overhead when TDX is disabled(CONFIG_INTEL_TDX_HOST=n). - . Avoid overhead of indirect call via function pointers. - . Contain the changes under arch/x86/kvm/vmx directory and share logic +Several points to be considered: + + * No or minimal overhead when TDX is disabled(CONFIG_INTEL_TDX_HOST=n). + * Avoid overhead of indirect call via function pointers. + * Contain the changes under arch/x86/kvm/vmx directory and share logic with VMX for maintenance. Even though the ways to operation on VM (VMX instruction vs TDX SEAM call) is different, the basic idea remains same. So, many logic can be shared. - . Future maintenance + * Future maintenance The huge change of kvm_x86_ops in (near) future isn't expected. a centralized file is acceptable. @@ -295,21 +296,23 @@ One bit of GPA (51 or 47 bit) is repurposed so that it means shared with host(if set to 1) or private to TD(if cleared to 0). - The current implementation - . Reuse the existing MMU code with minimal update. Because the + + * Reuse the existing MMU code with minimal update. Because the execution flow is mostly same. But additional operation, TDX call for S-EPT, is needed. So add hooks for it to kvm_x86_ops. - . For performance, minimize TDX SEAM call to operate on S-EPT. When + * For performance, minimize TDX SEAM call to operate on S-EPT. When getting corresponding S-EPT pages/entry from faulting GPA, don't use TDX SEAM call to read S-EPT entry. Instead create shadow copy in host memory. Repurpose the existing kvm_mmu_page as shadow copy of S-EPT and associate S-EPT to it. - . Treats share bit as attributes. mask/unmask the bit where + * Treats share bit as attributes. mask/unmask the bit where necessary to keep the existing traversing code works. Introduce kvm.arch.gfn_shared_mask and use "if (gfn_share_mask)" for special case. - = 0 : for non-TDX case - = 51 or 47 bit set for TDX case. + + * 0 : for non-TDX case + * 51 or 47 bit set for TDX case. Pros: From patchwork Sat Jul 9 04:20:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bagas Sanjaya X-Patchwork-Id: 12912070 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 704A4C433EF for ; Sat, 9 Jul 2022 04:21:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229675AbiGIEVe (ORCPT ); Sat, 9 Jul 2022 00:21:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbiGIEVU (ORCPT ); Sat, 9 Jul 2022 00:21:20 -0400 Received: from mail-pj1-x1030.google.com (mail-pj1-x1030.google.com [IPv6:2607:f8b0:4864:20::1030]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B3B54B0E2; Fri, 8 Jul 2022 21:21:20 -0700 (PDT) Received: by mail-pj1-x1030.google.com with SMTP id s21so633511pjq.4; Fri, 08 Jul 2022 21:21:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uc2nzWj3GO3b5HUllJokkKuyzfzRetWmte+HK193uOQ=; b=i06nVhPonWm+JM9xl/dd/0p/O5J7aTiWCZAbG9qdk8Li8lvxFrCx92Anh26b5LPe80 jkcNLI9u/rAQ4gBNl+TaTNBkggsC0z6ud/chHCv3q8QkUL/qOnUA5RstffkdMKuA5qnd 78Xs7mzIQZnXa89Xh7C8m5mmOHpbkbLi2lPD31on7XgR2Bd2EZky6cW1K6tg4Yu5FEr1 hgiOwfCZ64IfEaDHmbIcGvly9Ka6SYdzRJb+d2hXJ8cTL1qLlcrlouZ9x98JpUoqBBmS 2YMbA8POsl/sAoLssd2snQhovnMpIC4l2k41Of+qmumGpcCxJHB1J1xn476mqdWg+499 HGNg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uc2nzWj3GO3b5HUllJokkKuyzfzRetWmte+HK193uOQ=; b=kGc99Vkir/oDBeKBnZT86M8lD4jKPGzZZQeitQIq0YCijnUgTWsIX9qwWWFSBtvVE/ jWd74GSzX7w7cJX2ewPAKCgWAt2yGa/iLGMrLOLLvbJM1uHanZn1x7OTuos7jzUuWwQK VKAsxSd1cKjTmafgm8diNNU8uttRebxZiAk9ZCr9fpCFb4REsegiLqnirvO8UJlVOekx A85YS2h2Dw24KlIN9JGIvQcM4S2i+eBFJYuDgjvnf26hv2bi9lh4Rj4gLhc/72po1ult PV+I0IkBqocP/QxhKjru+3kmiTN/XGwkFW3zV2+e1M95AzgqfsHbqpeouHiunK9JGpre BJYw== X-Gm-Message-State: AJIora+Pv0AkLA+oWMtEWjwDZkLEGjmJwmjcjKehCg9qwbxrw3iar4LI kBGhlf4PUbrP4TYMq5ubCdA= X-Google-Smtp-Source: AGRyM1vQ5WjnidPWh3oz/3gYL8JM5bSyUewuloXko384/8Ex/0+LkeDTe7iXU+VyBzr5v8+QUYhvCQ== X-Received: by 2002:a17:902:e946:b0:16b:d4e1:a405 with SMTP id b6-20020a170902e94600b0016bd4e1a405mr7015887pll.16.1657340479553; Fri, 08 Jul 2022 21:21:19 -0700 (PDT) Received: from debian.me (subs02-180-214-232-88.three.co.id. [180.214.232.88]) by smtp.gmail.com with ESMTPSA id n5-20020a622705000000b005254c71df0esm408394pfn.86.2022.07.08.21.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 21:21:19 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id 59A35103943; Sat, 9 Jul 2022 11:21:10 +0700 (WIB) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Isaku Yamahata , Kai Huang , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Bagas Sanjaya Subject: [PATCH 03/12] Documentation: kvm: tdx: Add footnote markers Date: Sat, 9 Jul 2022 11:20:29 +0700 Message-Id: <20220709042037.21903-4-bagasdotme@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220709042037.21903-1-bagasdotme@gmail.com> References: <20220709042037.21903-1-bagasdotme@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org Sphinx reported unreferenced footnotes warnings: Documentation/virt/kvm/intel-tdx.rst:353: WARNING: Footnote [1] is not referenced. Documentation/virt/kvm/intel-tdx.rst:355: WARNING: Footnote [2] is not referenced. Documentation/virt/kvm/intel-tdx.rst:357: WARNING: Footnote [3] is not referenced. Documentation/virt/kvm/intel-tdx.rst:359: WARNING: Footnote [4] is not referenced. Documentation/virt/kvm/intel-tdx.rst:361: WARNING: Footnote [5] is not referenced. Documentation/virt/kvm/intel-tdx.rst:363: WARNING: Footnote [6] is not referenced. Documentation/virt/kvm/intel-tdx.rst:365: WARNING: Footnote [7] is not referenced. Documentation/virt/kvm/intel-tdx.rst:367: WARNING: Footnote [8] is not referenced. Documentation/virt/kvm/intel-tdx.rst:370: WARNING: Footnote [9] is not referenced. Documentation/virt/kvm/intel-tdx.rst:372: WARNING: Footnote [10] is not referenced. Documentation/virt/kvm/intel-tdx.rst:375: WARNING: Footnote [11] is not referenced. Documentation/virt/kvm/intel-tdx.rst:380: WARNING: Footnote [12] is not referenced. Add missing reference markers to fix the warnings. While at it, reword "Overview" section paragraph. Fixes: 9e54fa1ac03df3 ("Documentation/virtual/kvm: Document on Trust Domain Extensions(TDX)") Signed-off-by: Bagas Sanjaya --- Documentation/virt/kvm/intel-tdx.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Documentation/virt/kvm/intel-tdx.rst b/Documentation/virt/kvm/intel-tdx.rst index 7a7c17da3a045f..7371e152021621 100644 --- a/Documentation/virt/kvm/intel-tdx.rst +++ b/Documentation/virt/kvm/intel-tdx.rst @@ -8,9 +8,11 @@ Overview ======== TDX stands for Trust Domain Extensions which isolates VMs from the virtual-machine manager (VMM)/hypervisor and any other software on -the platform. [1] -For details, the specifications, [2], [3], [4], [5], [6], [7], are -available. +the platform. For details, see the specifications [1]_, whitepaper [2]_, +architectural extensions specification [3]_, module documentation [4]_, +loader interface specification [5]_, guest-hypervisor communication +interface [6]_, virtual firmware design guide [7]_, and other resources +([8]_, [9]_, [10]_, [11]_, and [12]_). API description From patchwork Sat Jul 9 04:20:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bagas Sanjaya X-Patchwork-Id: 12912068 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B4381C43334 for ; Sat, 9 Jul 2022 04:21:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229656AbiGIEV1 (ORCPT ); Sat, 9 Jul 2022 00:21:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbiGIEVT (ORCPT ); Sat, 9 Jul 2022 00:21:19 -0400 Received: from mail-pf1-x433.google.com (mail-pf1-x433.google.com [IPv6:2607:f8b0:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 798284E63A; Fri, 8 Jul 2022 21:21:17 -0700 (PDT) Received: by mail-pf1-x433.google.com with SMTP id x184so635339pfx.2; Fri, 08 Jul 2022 21:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=kqgIf//8Dsl2ovKoNOr5TejvwiroTvJl6z8lZ1nXLAM=; b=Usw0VXUMjNukfejaUnXIB/Vzmd2l1UiAb2WfP4Q7LdDheS5mNfYmk6pTkv8u6Klc/7 0Ooi9So+aPuDD9nC3tHcZXKB5ONHBfKFZk/7a+CFpsVl2pQo8NbtYC5Br5kmi8718iUK 70vvL6czsqWCMJUkTbpmJxu3GMnZOhFadG1NkBb22fz3+VJIOLeRT3AT1TltyItI7ywT 9OIOJEkfZ7IRzyg+3SXtV5wwPLfHM9b61jkesevh5qyLDlcvfEeyVpXCE/8wB0V+T5E3 jq1tLgwfEffn07CUDmMg2Cp3fOYjvFqkYOjciuACHOHczbAli9cv2Q5xj75KyUAKRPOQ 3VlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kqgIf//8Dsl2ovKoNOr5TejvwiroTvJl6z8lZ1nXLAM=; b=dfiA02IfVdkMgX5JXoRAvQop4KkbACWqvV87XqGBqSNKdGuQyoEqtXyNEUegsRyw9j Klqu4czR0uQqEi6pxRZ7XUu8ILreCbBkBjARDhMFU66Rd/QDD5Ak1AmcEk8Fdj4xBD7a AiV0it1BhXAfqvv9O+H6tfpV/cYPhFao7RONdMoz4JUAD2d2dZNNHQzcjarItUie8mGT 9DfOvFY6O2UU3Z3y7G/hC9fgJMOGyb9TUNLfkmVgbB3nEB91g/UhzeQEw69YmAzOFFUi zY7BBi60cKP0HM5GxiTlxonbHvDIVMKXVQxkbmQ9rR38m4tEdI0pbfPQ/aX4XnSy8Ub9 /nSA== X-Gm-Message-State: AJIora9KYhPOCuHPEr4N1eV1GbxPyUnBKAcKJBPDV9aUWtEE3rfHgEjE 0I6wNMVMIV/GTwGK6+CLFNQ= X-Google-Smtp-Source: AGRyM1uaifn+sBYgGLh8V7LYIVrg6zY7zfcgJlqWMsGptHsp8J2gb+VBTHjpdj48qGOH+OiPgJv7AQ== X-Received: by 2002:a63:8641:0:b0:413:8c07:4ebf with SMTP id x62-20020a638641000000b004138c074ebfmr6136013pgd.604.1657340476917; Fri, 08 Jul 2022 21:21:16 -0700 (PDT) Received: from debian.me (subs02-180-214-232-88.three.co.id. [180.214.232.88]) by smtp.gmail.com with ESMTPSA id m6-20020a1709026bc600b0016c325141d2sm287884plt.15.2022.07.08.21.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 21:21:15 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id C22FD103874; Sat, 9 Jul 2022 11:21:10 +0700 (WIB) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Isaku Yamahata , Kai Huang , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Bagas Sanjaya Subject: [PATCH 04/12] Documentation: kvm: tdx: Use bullet list for public kvm trees Date: Sat, 9 Jul 2022 11:20:30 +0700 Message-Id: <20220709042037.21903-5-bagasdotme@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220709042037.21903-1-bagasdotme@gmail.com> References: <20220709042037.21903-1-bagasdotme@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The 8th external reference (public trees), doesn't have bullet list for listing, so the reference is rendered as continous paragraph instead. Use bullet list for the reference. Fixes: 9e54fa1ac03df3 ("Documentation/virtual/kvm: Document on Trust Domain Extensions(TDX)") Signed-off-by: Bagas Sanjaya --- Documentation/virt/kvm/intel-tdx.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Documentation/virt/kvm/intel-tdx.rst b/Documentation/virt/kvm/intel-tdx.rst index 7371e152021621..1e3ad0ca2925bf 100644 --- a/Documentation/virt/kvm/intel-tdx.rst +++ b/Documentation/virt/kvm/intel-tdx.rst @@ -417,8 +417,10 @@ References .. [7] Intel TDX Virtual Firmware Design Guide https://software.intel.com/content/dam/develop/external/us/en/documents/tdx-virtual-firmware-design-guide-rev-1. .. [8] intel public github - kvm TDX branch: https://github.com/intel/tdx/tree/kvm - TDX guest branch: https://github.com/intel/tdx/tree/guest + + * kvm TDX branch: https://github.com/intel/tdx/tree/kvm + * TDX guest branch: https://github.com/intel/tdx/tree/guest + .. [9] tdvf https://github.com/tianocore/edk2-staging/tree/TDVF .. [10] KVM forum 2020: Intel Virtualization Technology Extensions to From patchwork Sat Jul 9 04:20:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bagas Sanjaya X-Patchwork-Id: 12912065 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02EE0C433EF for ; Sat, 9 Jul 2022 04:21:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229577AbiGIEVU (ORCPT ); Sat, 9 Jul 2022 00:21:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbiGIEVS (ORCPT ); Sat, 9 Jul 2022 00:21:18 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21E8B4E62C; Fri, 8 Jul 2022 21:21:17 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id p16so397659plo.0; Fri, 08 Jul 2022 21:21:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ycgZMvq2EVogDaqogTrk1vbctpDqtsq51oWL+KX1fwE=; b=IUDAVGaP5i3wsy3MP7idxdjv/VjJdS+DB+cAE3/YgLZLVDuWvQB9rVuxzkECFqDnUs RKd8CYxxe2w3QYWEaaoyivVcPG29K32MEkFPDK9ivuexTkUrQqm6IY9gq4wcCW199PIS WQ2GI28IgKCEhda632Rr1HUJJOioldYc17bWyhoKqfMfajnHBczDGV/vk8wZjRkMoHA9 HboWCIZ1UYh/OhQqsjXMnt4rJ0MbWEzzPeF30lwAvWAU9549IigCdM10XeYWlaqKCL6G 8Y4iDGHxfkyayiuDvhbZaUt8O9vPgy4f/UDazRQCO3clor3TQ2PTTwsP+aPbJNjmTI1M 4yPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ycgZMvq2EVogDaqogTrk1vbctpDqtsq51oWL+KX1fwE=; b=yPcoPsDqxo9AKwk8fJR0CcCoGZtcmYMF+G5iWa23CzqLCEQOkhjH6xENrPK/xNAHMi XW6Qgp9BlnuDtEMVS/vdxGLlHyipI+Y5ktJHgnnq+vlvbsSH2Uc0nu0Q1g+WFWS22KI/ Dt+5KDvAAciUTtqJfKk8grP1PZZfa+mX5dmHK5n9SDosWe/2p0HG+YgPKOL+qEPqbtzF lC7wfy+Jw9m3I1EQ3snC+UKdoxOtLNfTGaLkCNw72qE7eRyUtr/+EFmY3LlGY32wY29B VbBxgmHibQ2CxYccbAy3ymKHB/cfYVEeoAjZHC1DIoZcqQGdOnP+osdC2uUk7j+Gj2oc vfRg== X-Gm-Message-State: AJIora8lbgfuMSySafkOsZmth8T8CZDAkYyjOxRVnRFGIh0sRJOwU/tq D0Ufas0hAxmZMBiq8tA/Coo= X-Google-Smtp-Source: AGRyM1u3R/Bf4/mPqH1iFvrcy+Oj5Qvhdsg7oo64sXJHUcB+TfJl++7Ezz2mL+4sZEqgogHTXga2Ag== X-Received: by 2002:a17:902:eccf:b0:16b:f555:d42e with SMTP id a15-20020a170902eccf00b0016bf555d42emr6858192plh.75.1657340476542; Fri, 08 Jul 2022 21:21:16 -0700 (PDT) Received: from debian.me (subs02-180-214-232-88.three.co.id. [180.214.232.88]) by smtp.gmail.com with ESMTPSA id q17-20020a170902f35100b0016bf803341asm332158ple.146.2022.07.08.21.21.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 21:21:15 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id E3A411039B1; Sat, 9 Jul 2022 11:21:10 +0700 (WIB) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Isaku Yamahata , Kai Huang , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Bagas Sanjaya Subject: [PATCH 05/12] Documentation: kvm: tdx: title typofix Date: Sat, 9 Jul 2022 11:20:31 +0700 Message-Id: <20220709042037.21903-6-bagasdotme@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220709042037.21903-1-bagasdotme@gmail.com> References: <20220709042037.21903-1-bagasdotme@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The page title contains misspelled "Dodmain" instead of "Domain" and missing space before abbreviation parentheses. Fix both mistakes. Fixes: 9e54fa1ac03df3 ("Documentation/virtual/kvm: Document on Trust Domain Extensions(TDX)") Signed-off-by: Bagas Sanjaya --- Documentation/virt/kvm/intel-tdx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/virt/kvm/intel-tdx.rst b/Documentation/virt/kvm/intel-tdx.rst index 1e3ad0ca2925bf..5288631c80122d 100644 --- a/Documentation/virt/kvm/intel-tdx.rst +++ b/Documentation/virt/kvm/intel-tdx.rst @@ -1,7 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0 =================================== -Intel Trust Dodmain Extensions(TDX) +Intel Trust Domain Extensions (TDX) =================================== Overview From patchwork Sat Jul 9 04:20:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bagas Sanjaya X-Patchwork-Id: 12912072 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 13CD1C43334 for ; Sat, 9 Jul 2022 04:21:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229664AbiGIEVj (ORCPT ); Sat, 9 Jul 2022 00:21:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229607AbiGIEVW (ORCPT ); Sat, 9 Jul 2022 00:21:22 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6650D4E62C; Fri, 8 Jul 2022 21:21:20 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id 89-20020a17090a09e200b001ef7638e536so3693742pjo.3; Fri, 08 Jul 2022 21:21:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=HfxesvineA4lvvWA39Rhk5vO9ldVF5vKgZoZqN8KzAg=; b=jkbZ4X55kBzGE43KDHuVaa+mNhz/mniIFifPbU2PnSiHJCLz4j+hGqF/KP9wlPkWzf QTtRuKYyw2gAEfq5Qr0gn9mEkfiSXNf7T+3OuOfeJwlZEPDyuSg7Iox3HN4Hs3t7Yg5p aobyjtXKKfedI0CTrZaHGF8lGQx3OA0YUE6jh8o6avgEzIVMlyFhivD1wbHBdX/XjUAO 7kGwlUepcsIT2sR0CscKM/z0hjQfhPZEIVvLQwsyJj+SiLTXesRkCvuqGsEuLGsElCoo 7rpTWhkhwYBHnkt/CFnz0GDtOYg2D+tXzYL9scs5R9nXAuXp7elOv7BcULLSBNo8QsUQ XTsg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=HfxesvineA4lvvWA39Rhk5vO9ldVF5vKgZoZqN8KzAg=; b=4oCQ0oRyyNtx7AL63Qm8ZzxUAnZNQOFTDVZlHZMCltHaaDCYbEXt8RonOppo+bHa2T WiZwlSJ7kLc3mS+dMqL+SuVMvS/QTmkasRKqWK5B23ita5V7Xj1Izbpu64egvoRzHyQZ zGVwIRUJmauefmnuUUJoe5HwCvXQTR+lnUukR669Q96tX4XISuQzxnrx4VoDGp5iStzt bgWhn+mP7HoT0S5S2dLI03gHyawzrMFMn58yF/yBzehyFbz8cWhys8Fj9bJF0KcCWYYX stkjw3EcLFXZdbTBMp6vJeb2/LYTdeeMW7411jz5yp5Ii4nneIxmdhJr5ymG/eqQCQLX 6vJg== X-Gm-Message-State: AJIora8pvctylhYI4RBbwPe1xk4Ns8iES5Hdv6JJ2A1/HjC490bsLjrF cRCbyC6tgk29udrkTv3UJjs= X-Google-Smtp-Source: AGRyM1tKZFbicaQ6X8X63qh/3nFn1Iti2dztUHzcNQoixiHnU66TeRKYrUAa+mAqIFWQJ8cJqw7JWw== X-Received: by 2002:a17:902:d488:b0:16a:158e:dd19 with SMTP id c8-20020a170902d48800b0016a158edd19mr6977288plg.105.1657340479890; Fri, 08 Jul 2022 21:21:19 -0700 (PDT) Received: from debian.me (subs02-180-214-232-88.three.co.id. [180.214.232.88]) by smtp.gmail.com with ESMTPSA id e3-20020a170902784300b001641b2d61d4sm350580pln.30.2022.07.08.21.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 21:21:19 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id 8067A103962; Sat, 9 Jul 2022 11:21:10 +0700 (WIB) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Isaku Yamahata , Kai Huang , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Bagas Sanjaya Subject: [PATCH 06/12] Documentation: kvm: tdx-tdp-mmu: Add blank line padding for lists Date: Sat, 9 Jul 2022 11:20:32 +0700 Message-Id: <20220709042037.21903-7-bagasdotme@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220709042037.21903-1-bagasdotme@gmail.com> References: <20220709042037.21903-1-bagasdotme@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org There are many "unexpected indentations"-"block quote"-"bullet list" warnings that are caused by missing blank line padding on bullet lists at tdx-tdp-mmu.rst. Add the padding to fix the warnings. Fixes: 7af4efe3263854 ("KVM: x86: design documentation on TDX support of x86 KVM TDP MMU") Signed-off-by: Bagas Sanjaya --- Documentation/virt/kvm/tdx-tdp-mmu.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/virt/kvm/tdx-tdp-mmu.rst b/Documentation/virt/kvm/tdx-tdp-mmu.rst index 6d63bb75f785ab..c9d5fc43a6ca7a 100644 --- a/Documentation/virt/kvm/tdx-tdp-mmu.rst +++ b/Documentation/virt/kvm/tdx-tdp-mmu.rst @@ -63,32 +63,39 @@ Instead, TDX SEAMCALL API is used. Several SEAMCALLs correspond to operation on the EPT entry. * TDH.MEM.SEPT.ADD(): + Add a secure EPT page from the secure EPT tree. This corresponds to updating the non-leaf EPT entry with present bit set * TDH.MEM.SEPT.REMOVE(): + Remove the secure page from the secure EPT tree. There is no corresponding to the EPT operation. * TDH.MEM.SEPT.RD(): + Read the secure EPT entry. This corresponds to reading the EPT entry as memory. Please note that this is much slower than direct memory reading. * TDH.MEM.PAGE.ADD() and TDH.MEM.PAGE.AUG(): + Add a private page to the secure EPT tree. This corresponds to updating the leaf EPT entry with present bit set. * THD.MEM.PAGE.REMOVE(): + Remove a private page from the secure EPT tree. There is no corresponding to the EPT operation. * TDH.MEM.RANGE.BLOCK(): + This (mostly) corresponds to clearing the present bit of the leaf EPT entry. Note that the private page is still linked in the secure EPT. To remove it from the secure EPT, TDH.MEM.SEPT.REMOVE() and TDH.MEM.PAGE.REMOVE() needs to be called. * TDH.MEM.TRACK(): + Increment the TLB epoch counter. This (mostly) corresponds to EPT TLB flush. Note that the private page is still linked in the secure EPT. To remove it from the secure EPT, tdh_mem_page_remove() needs to be called. @@ -110,25 +117,34 @@ Dropping private page and TLB shootdown The procedure of dropping the private page looks as follows. 1. TDH.MEM.RANGE.BLOCK(4K level) + This mostly corresponds to clear the present bit in the EPT entry. This prevents (or blocks) TLB entry from creating in the future. Note that the private page is still linked in the secure EPT tree and the existing cache entry in the TLB isn't flushed. + 2. TDH.MEM.TRACK(range) and TLB shootdown + This mostly corresponds to the EPT TLB shootdown. Because all vcpus share the same Secure EPT, all vcpus need to flush TLB. + * TDH.MEM.TRACK(range) by one vcpu. It increments the global internal TLB epoch counter. * send IPI to remote vcpus * Other vcpu exits to VMM from guest TD and then re-enter. TDH.VP.ENTER(). * TDH.VP.ENTER() checks the TLB epoch counter and If its TLB is old, flush TLB. + Note that only single vcpu issues tdh_mem_track(). + Note that the private page is still linked in the secure EPT tree, unlike the conventional EPT. + 3. TDH.MEM.PAGE.PROMOTE, TDH.MEM.PAGEDEMOTE(), TDH.MEM.PAGE.RELOCATE(), or TDH.MEM.PAGE.REMOVE() + There is no corresponding operation to the conventional EPT. + * When changing page size (e.g. 4K <-> 2M) TDH.MEM.PAGE.PROMOTE() or TDH.MEM.PAGE.DEMOTE() is used. During those operation, the guest page is kept referenced in the Secure EPT. From patchwork Sat Jul 9 04:20:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bagas Sanjaya X-Patchwork-Id: 12912077 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0E4A5C433EF for ; Sat, 9 Jul 2022 04:21:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229694AbiGIEVt (ORCPT ); Sat, 9 Jul 2022 00:21:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229634AbiGIEVY (ORCPT ); Sat, 9 Jul 2022 00:21:24 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 582F04B0E2; Fri, 8 Jul 2022 21:21:23 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id f11so375367plr.4; Fri, 08 Jul 2022 21:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1RuJQddSvsoGrYfcpLM/x3vIgUa0k5VONeC0Fi8Aj/A=; b=S9Q+ruIQIcc5r9ovy/YHDvWRrAWhddNdabcaCXlEWsz2VSvaocKMh4uyP7P+g+/IyE NTi3ZC08g/kz2iutkH67cytSdAXrltdUa+CETivcolwx/POyB0pxEfCHcgCcpNbm+1Tz 3AU73dQOrQZ2vzT1Esoz09U0EynpliGMHmwfLQRBiKSTGMD/bmQYJrUSZ+jkhXrvI9oH BSXimMjNbjkCqzMX7iEGQ+shy83eyKxXm20F0RNRxZDAteNlx9ur6/SHQVZ/qKVonNsg g3MwGRj8jrtpc1GW9+dRk/T1cXeid1qLiR/Lgfskxh/nF9jNfgx7csj7zE5tYOi9m0p3 d/og== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1RuJQddSvsoGrYfcpLM/x3vIgUa0k5VONeC0Fi8Aj/A=; b=K2YLe9+GUtnokDENeINi81Ta6msQoisuhwbmFQWox/D+z8ZPpdOL7g2G1xMYrIetJW ECxE4YoXpSBXEvi96usQO3u2CP8GxKBQTagW1jLGxinBlmLeHWASojWP40dPt4KJWWax DrFga5S3iT4DHBMWmB64t/Ekzib8SbXhWg283Q1ihoK1C0ctDK97P0gNvMJneiacPYd5 JAss7ZaPx7RtvP/PE4LZauYjp/SFFMU9zU5L8xNlbFk1+d63e4140+/ynE38dqFkxTdk i5X0D2fG+d3A8a+JrCApV/Z3blOamW0NAMzaOlv1Koe1qA4tiDSEdvPSb2EIcGsRMkMN LXkg== X-Gm-Message-State: AJIora+n2Z1Sqr4+M00PUm2Q/3Lb6WpZrTItP/6gdHUNzeSlhvaVsEWk rgQ0YeHXE7L8sCZaj2XGHf4= X-Google-Smtp-Source: AGRyM1sZPLRuUTnbSpWVs0uiHpCvTCPLH0GGNvgQRsL46bFZC1V58IMyUQwKmUeIwbtPIM3/YWeF3A== X-Received: by 2002:a17:902:ce88:b0:16c:1b1e:71b4 with SMTP id f8-20020a170902ce8800b0016c1b1e71b4mr6908770plg.153.1657340482881; Fri, 08 Jul 2022 21:21:22 -0700 (PDT) Received: from debian.me (subs02-180-214-232-88.three.co.id. [180.214.232.88]) by smtp.gmail.com with ESMTPSA id b1-20020a170902bd4100b0016be834d544sm318965plx.237.2022.07.08.21.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 21:21:21 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id 023FB1039D3; Sat, 9 Jul 2022 11:21:10 +0700 (WIB) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Isaku Yamahata , Kai Huang , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Bagas Sanjaya Subject: [PATCH 07/12] Documentation: kvm: tdx-tdp-mmu: Use literal code block for EPT violation diagrams Date: Sat, 9 Jul 2022 11:20:33 +0700 Message-Id: <20220709042037.21903-8-bagasdotme@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220709042037.21903-1-bagasdotme@gmail.com> References: <20220709042037.21903-1-bagasdotme@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org EPT violation diagrams aren't inside literal code block, which trigger "line block ends without a blank line" warning. Since these diagrams aren't meant line blocks, use literal code block instead. Fixes: 7af4efe3263854 ("KVM: x86: design documentation on TDX support of x86 KVM TDP MMU") Signed-off-by: Bagas Sanjaya --- Documentation/virt/kvm/tdx-tdp-mmu.rst | 39 +++++++++++++++++--------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/Documentation/virt/kvm/tdx-tdp-mmu.rst b/Documentation/virt/kvm/tdx-tdp-mmu.rst index c9d5fc43a6ca7a..f43ebb08f5cdad 100644 --- a/Documentation/virt/kvm/tdx-tdp-mmu.rst +++ b/Documentation/virt/kvm/tdx-tdp-mmu.rst @@ -169,30 +169,41 @@ hooks to KVM MMU to reuse the existing code. EPT violation on shared GPA --------------------------- (1) EPT violation on shared GPA or zapping shared GPA - walk down shared EPT tree (the existing code) - | - | - V -shared EPT tree (CPU refers.) + :: + + walk down shared EPT tree (the existing code) + | + | + V + shared EPT tree (CPU refers.) + (2) update the EPT entry. (the existing code) + TLB shootdown in the case of zapping. EPT violation on private GPA ---------------------------- (1) EPT violation on private GPA or zapping private GPA - walk down the mirror of secure EPT tree (mostly same as the existing code) - | - | - V -mirror of secure EPT tree (KVM MMU software only. reuse of the existing code) + :: + + walk down the mirror of secure EPT tree (mostly same as the existing code) + | + | + V + mirror of secure EPT tree (KVM MMU software only. reuse of the existing code) + (2) update the (mirrored) EPT entry. (mostly same as the existing code) + (3) call the hooks with what EPT entry is changed - | + :: + + | NEW: hooks in KVM MMU - | - V -secure EPT root(CPU refers) + | + V + secure EPT root(CPU refers) + (4) the TDX backend calls necessary TDX SEAMCALLs to update real secure EPT. The major modification is to add hooks for the TDX backend for additional From patchwork Sat Jul 9 04:20:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bagas Sanjaya X-Patchwork-Id: 12912073 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1DC7C43334 for ; Sat, 9 Jul 2022 04:21:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229652AbiGIEVk (ORCPT ); Sat, 9 Jul 2022 00:21:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229616AbiGIEVW (ORCPT ); Sat, 9 Jul 2022 00:21:22 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 334074B0E2; Fri, 8 Jul 2022 21:21:21 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id p16so397751plo.0; Fri, 08 Jul 2022 21:21:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zWrpjAec6xqPgolIekjuMJs7WhTq4gJR+BYNxVJxFmQ=; b=Wnp2xdnGn5KBGRzZleKNjfV9hrAVQhe8/tnLookizUDENK3CVs8jj6Hw6RlbC7VKP+ ZmgLZLucVtidp0cjAxivvCWvxIJc1CBifHam7baktIKnX1qNXmEXd4FdxePVpiBNYyhc FXreZaRgR/0dUHkATci5Q2VL5Ku3jB5eMheI2ybKWJkfZarX0+wtWBQW0/g874MA1thQ OOFmIcUiXzFLp79vG1eHBr1eubhDk/ElfwufGLFq9Wa7QtP6KDZF6gFKCmE4xiJUszxM upUUwWfzQP/2+bi7yrjLczN0rmXIbIX2+bXeCwSQYQa/f18SJUbdUUNhvy0H6Uo8n3IE 4xIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zWrpjAec6xqPgolIekjuMJs7WhTq4gJR+BYNxVJxFmQ=; b=lyNd8taCEoOYp3RfHGy2K8PcG9ZI9tmBS54KEWlxao8fqqvPfLejwkrGjA5+ken8cd piYrOLQfzvnNNBK6GK6mucgsdkiavDiBhg5wRE3W2ngsq8nQIgZQMnGL/7cI0AnRkQ5C YYQhOLx0GsKwawlWBA7oYoKR1ilWWAYu9HjsTZBSuaO877Fc7xpidYXWLE0frQ4FpEJE gaGl6LEa1MVwTm9+yonuvFAbqXdBrbiiDre8BOnPmxtKH3ZDawOY6nRmLsq2wAnUntoS Yw2YA5g0FeSLkYdwdb/fV2T+fonsz/63LbRmcMAqKXrkqRlcgELZGIcX+Bv6NF9HQq+Q L9ug== X-Gm-Message-State: AJIora/ElbLjkhAFc2NGO1qKFA+F+kjiF/meA+7xwd/K6BulEFEZLclC ljW8tZZDsW1Y/ZXtPAWvO3o= X-Google-Smtp-Source: AGRyM1v8voTKNedhWqldcO9l9/LMMOcD8g8wMf4+SDsvod/9edy9wfPOtcDdhqpXny+DWJU9Ax/8Gw== X-Received: by 2002:a17:902:8b8a:b0:16b:b560:da62 with SMTP id ay10-20020a1709028b8a00b0016bb560da62mr7193984plb.20.1657340480918; Fri, 08 Jul 2022 21:21:20 -0700 (PDT) Received: from debian.me (subs02-180-214-232-88.three.co.id. [180.214.232.88]) by smtp.gmail.com with ESMTPSA id p64-20020a62d043000000b0052a297324cbsm418687pfg.41.2022.07.08.21.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 21:21:19 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id C23851039D5; Sat, 9 Jul 2022 11:21:11 +0700 (WIB) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Isaku Yamahata , Kai Huang , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Bagas Sanjaya Subject: [PATCH 08/12] Documentation: kvm: tdx-tdp-mmu: Properly format nested list for EPT state machine Date: Sat, 9 Jul 2022 11:20:34 +0700 Message-Id: <20220709042037.21903-9-bagasdotme@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220709042037.21903-1-bagasdotme@gmail.com> References: <20220709042037.21903-1-bagasdotme@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The state machine list for EPT entry state machine basically use nested bullet lists to describe all possible results. However, the list is badly formatted, hence triggers many indentation warnings. Fix the nested list formatting. Fixes: 7af4efe3263854 ("KVM: x86: design documentation on TDX support of x86 KVM TDP MMU") Signed-off-by: Bagas Sanjaya --- Documentation/virt/kvm/tdx-tdp-mmu.rst | 134 ++++++++++++++----------- 1 file changed, 76 insertions(+), 58 deletions(-) diff --git a/Documentation/virt/kvm/tdx-tdp-mmu.rst b/Documentation/virt/kvm/tdx-tdp-mmu.rst index f43ebb08f5cdad..c403e14fb223aa 100644 --- a/Documentation/virt/kvm/tdx-tdp-mmu.rst +++ b/Documentation/virt/kvm/tdx-tdp-mmu.rst @@ -306,76 +306,94 @@ for EPT violation path by penalizing MapGPA hypercall. The state machine of EPT entry ------------------------------ -(private EPT entry, shared EPT entry) = - (non-present, non-present): private mapping is allowed - (present, non-present): private mapping is mapped - (non-present | SPTE_SHARED_MASK, non-present | SPTE_SHARED_MASK): - shared mapping is allowed - (non-present | SPTE_SHARED_MASK, present | SPTE_SHARED_MASK): - shared mapping is mapped - (present | SPTE_SHARED_MASK, any) invalid combination +* (private EPT entry, shared EPT entry) -* map_gpa(private GPA): Mark the region that private GPA is allowed(NEW) - private EPT entry: clear SPTE_SHARED_MASK - present: nop - non-present: nop - non-present | SPTE_SHARED_MASK -> non-present (clear SPTE_SHARED_MASK) + * (non-present, non-present): + private mapping is allowed + * (present, non-present): + private mapping is mapped + * (non-present | SPTE_SHARED_MASK, non-present | SPTE_SHARED_MASK): + shared mapping is allowed + * (non-present | SPTE_SHARED_MASK, present | SPTE_SHARED_MASK): + shared mapping is mapped + * (present | SPTE_SHARED_MASK, any): + invalid combination - shared EPT entry: zap the entry, clear SPTE_SHARED_MASK - present: invalid - non-present -> non-present: nop - present | SPTE_SHARED_MASK -> non-present - non-present | SPTE_SHARED_MASK -> non-present +* map_gpa (private GPA): Mark the region that private GPA is allowed(NEW) -* map_gpa(shared GPA): Mark the region that shared GPA is allowed(NEW) - private EPT entry: zap and set SPTE_SHARED_MASK - present -> non-present | SPTE_SHARED_MASK - non-present -> non-present | SPTE_SHARED_MASK - non-present | SPTE_SHARED_MASK: nop + * private EPT entry: clear SPTE_SHARED_MASK - shared EPT entry: set SPTE_SHARED_MASK - present: invalid - non-present -> non-present | SPTE_SHARED_MASK - present | SPTE_SHARED_MASK -> present | SPTE_SHARED_MASK: nop - non-present | SPTE_SHARED_MASK -> non-present | SPTE_SHARED_MASK: nop + * present: nop + * non-present: nop + * non-present | SPTE_SHARED_MASK -> non-present (clear SPTE_SHARED_MASK) -* map(private GPA) - private EPT entry - present: nop - non-present -> present - non-present | SPTE_SHARED_MASK: nop. looping on EPT violation(NEW) + * shared EPT entry: zap the entry, clear SPTE_SHARED_MASK - shared EPT entry: nop + * present: invalid + * non-present -> non-present: nop + * present | SPTE_SHARED_MASK -> non-present + * non-present | SPTE_SHARED_MASK -> non-present -* map(shared GPA) - private EPT entry: nop +* map_gpa (shared GPA): Mark the region that shared GPA is allowed(NEW) - shared EPT entry - present: invalid - present | SPTE_SHARED_MASK: nop - non-present | SPTE_SHARED_MASK -> present | SPTE_SHARED_MASK - non-present: nop. looping on EPT violation(NEW) + * private EPT entry: zap and set SPTE_SHARED_MASK -* zap(private GPA) - private EPT entry: zap the entry with keeping SPTE_SHARED_MASK - present -> non-present - present | SPTE_SHARED_MASK: invalid - non-present: nop as is_shadow_present_pte() is checked - non-present | SPTE_SHARED_MASK: nop as is_shadow_present_pte() is - checked + * present -> non-present | SPTE_SHARED_MASK + * non-present -> non-present | SPTE_SHARED_MASK + * non-present | SPTE_SHARED_MASK: nop - shared EPT entry: nop + * shared EPT entry: set SPTE_SHARED_MASK -* zap(shared GPA) - private EPT entry: nop + * present: invalid + * non-present -> non-present | SPTE_SHARED_MASK + * present | SPTE_SHARED_MASK -> present | SPTE_SHARED_MASK: nop + * non-present | SPTE_SHARED_MASK -> non-present | SPTE_SHARED_MASK: nop - shared EPT entry: zap - any -> non-present - present: invalid - present | SPTE_SHARED_MASK -> non-present | SPTE_SHARED_MASK - non-present: nop as is_shadow_present_pte() is checked - non-present | SPTE_SHARED_MASK: nop as is_shadow_present_pte() is - checked +* map (private GPA) + + * private EPT entry + + * present: nop + * non-present -> present + * non-present | SPTE_SHARED_MASK: nop. looping on EPT violation(NEW) + + * shared EPT entry: nop + +* map (shared GPA) + + * private EPT entry: nop + + * shared EPT entry: + + * present: invalid + * present | SPTE_SHARED_MASK: nop + * non-present | SPTE_SHARED_MASK -> present | SPTE_SHARED_MASK + * non-present: nop. looping on EPT violation(NEW) + +* zap (private GPA) + + * private EPT entry: zap the entry with keeping SPTE_SHARED_MASK + + * present -> non-present + * present | SPTE_SHARED_MASK: invalid + * non-present: nop as is_shadow_present_pte() is checked + * non-present | SPTE_SHARED_MASK: nop as is_shadow_present_pte() is + checked + + * shared EPT entry: nop + +* zap (shared GPA) + + * private EPT entry: nop + + * shared EPT entry: zap + + * any -> non-present + * present: invalid + * present | SPTE_SHARED_MASK -> non-present | SPTE_SHARED_MASK + * non-present: nop as is_shadow_present_pte() is checked + * non-present | SPTE_SHARED_MASK: nop as is_shadow_present_pte() is + checked The original TDP MMU and race condition From patchwork Sat Jul 9 04:20:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bagas Sanjaya X-Patchwork-Id: 12912076 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 79619C43334 for ; Sat, 9 Jul 2022 04:21:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229723AbiGIEVq (ORCPT ); Sat, 9 Jul 2022 00:21:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229632AbiGIEVY (ORCPT ); Sat, 9 Jul 2022 00:21:24 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C87A14E62D; Fri, 8 Jul 2022 21:21:22 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id o3-20020a17090a744300b001ef8f7f3dddso387478pjk.3; Fri, 08 Jul 2022 21:21:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uXohxGFGaSlqXK87Mr0YBkysDoOymE++YQPhkvmJrvQ=; b=HE8j8luJq5h1OVBEDnt2bDyyG7gQ2TMvxhS4BO3wfbCbmR8FkSpOcnyR0mY/yrOxRD IWaLMdksPZHL559pF7ATCp2BCzEJh32ZvazfJGvu0ZA+axdFXRjiTEbo6cnXIym0PO4L zL1mZoXem+M0MOzMHAn1jIsn7IkMA3mp36smXIpERaBOFNlsixXj7lRz243aQb665ruU xC5Omi6ECS/i186oFtOZ5VURfQHw9t8JMIlKeN9DFF2/k7tGKo9LSwwjUmHw0gB7ikFy PtXaDBSLpjT9EeCOUhGKn7PV4IV3dBh34xk48Ss65fPGXmwHc3Yi8INqPclj/CH+JBMs MUog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uXohxGFGaSlqXK87Mr0YBkysDoOymE++YQPhkvmJrvQ=; b=25+OP/6SO3WHQQecfcY5l9FWeici74cp3G8valuKB9O/iqb1S4nlJRaDc6CxpHDxnB FShYkZD5bIQ2geSUsPGA7QLynlXDI+FQniSQnwOD3cv4zDjb/ikxodhIMDGxa0M14Gob WQBTd8bywjpj6fS/DLkI2f8iiHSi84Aky5LFMcLTBFaCOtp8Sj2ytVxYOjG0sLRaEyqC olDv8mCH2GLhMAqKhsoOk695S51MuTX3LzxFdLkm42L80UuQ0O7VnUUeTl/usE12yWie Ox/rVYG9o6zELEkCUWHfmb5glLpyAtqq+1cKzmd++wOBKhn5n4lD5AGDKgU/NEwxzEfI WLbA== X-Gm-Message-State: AJIora+upEKSBwkhJFt/SAayXZvRRCaQJEZyolrztxc6svYuIDwSSBGe SLQt7cR79IcRU3IQx2anf7dG3hzMOps= X-Google-Smtp-Source: AGRyM1vmqFdcqlLmm7x18MzA2ZZ+0RAazzVXsdxgZZQh9Dp3fyiu6FXsGc6jJS3l7w9g3lqpVqcWxw== X-Received: by 2002:a17:90a:e7cd:b0:1f0:c82:c88f with SMTP id kb13-20020a17090ae7cd00b001f00c82c88fmr1181858pjb.100.1657340482346; Fri, 08 Jul 2022 21:21:22 -0700 (PDT) Received: from debian.me (subs02-180-214-232-88.three.co.id. [180.214.232.88]) by smtp.gmail.com with ESMTPSA id b10-20020a170902d88a00b0016a268563ecsm353896plz.23.2022.07.08.21.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 21:21:21 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id EB5BD1039D6; Sat, 9 Jul 2022 11:21:11 +0700 (WIB) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Isaku Yamahata , Kai Huang , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Bagas Sanjaya Subject: [PATCH 09/12] Documentation: kvm: tdx-tdp-mmu: Add blank line padding to lists in concurrent sections Date: Sat, 9 Jul 2022 11:20:35 +0700 Message-Id: <20220709042037.21903-10-bagasdotme@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220709042037.21903-1-bagasdotme@gmail.com> References: <20220709042037.21903-1-bagasdotme@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The last warnings on tdx-tdp-mmu.rst are caused by missing blank line padding at lists on "concurrent" sections. Add the padding. Fixes: 7af4efe3263854 ("KVM: x86: design documentation on TDX support of x86 KVM TDP MMU") Signed-off-by: Bagas Sanjaya --- Documentation/virt/kvm/tdx-tdp-mmu.rst | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/virt/kvm/tdx-tdp-mmu.rst b/Documentation/virt/kvm/tdx-tdp-mmu.rst index c403e14fb223aa..f2170c154e18c3 100644 --- a/Documentation/virt/kvm/tdx-tdp-mmu.rst +++ b/Documentation/virt/kvm/tdx-tdp-mmu.rst @@ -418,8 +418,10 @@ Concurrent zapping 2. freeze the EPT entry (atomically set the value to REMOVED_SPTE) If other vcpu froze the entry, restart page fault. 3. TLB shootdown + * send IPI to remote vcpus * TLB flush (local and remote) + For each entry update, TLB shootdown is needed because of the concurrency. 4. atomically set the EPT entry to the final value @@ -429,6 +431,7 @@ Concurrent populating --------------------- In the case of populating the non-present EPT entry, atomically update the EPT entry. + 1. read lock 2. atomically update the EPT entry If other vcpu frozen the entry or updated the entry, restart page fault. @@ -436,6 +439,7 @@ entry. In the case of updating the present EPT entry (e.g. page migration), the operation is split into two. Zapping the entry and populating the entry. + 1. read lock 2. zap the EPT entry. follow the concurrent zapping case. 3. populate the non-present EPT entry. @@ -451,7 +455,6 @@ In this case, the TLB shootdown is batched into one. 3. TLB shootdown 4. write unlock - For Secure EPT, TDX SEAMCALLs are needed in addition to updating the mirrored EPT entry. @@ -462,9 +465,11 @@ Add a hook for TDX SEAMCALLs at the step of the TLB shootdown. 1. read lock 2. freeze the EPT entry(set the value to REMOVED_SPTE) 3. TLB shootdown via a hook + * TLB.MEM.RANGE.BLOCK() * TLB.MEM.TRACK() * send IPI to remote vcpus + 4. set the EPT entry to the final value 5. read unlock @@ -477,7 +482,9 @@ condition. A hook can be added. 1. read lock 2. freeze the EPT entry 3. hook + * TDH_MEM_SEPT_ADD() for non-leaf or TDH_MEM_PAGE_AUG() for leaf. + 4. set the EPT entry to the final value 5. read unlock From patchwork Sat Jul 9 04:20:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bagas Sanjaya X-Patchwork-Id: 12912071 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBDD6C43334 for ; Sat, 9 Jul 2022 04:21:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229489AbiGIEVg (ORCPT ); Sat, 9 Jul 2022 00:21:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229606AbiGIEVW (ORCPT ); Sat, 9 Jul 2022 00:21:22 -0400 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CDA214E62D; Fri, 8 Jul 2022 21:21:20 -0700 (PDT) Received: by mail-pg1-x52f.google.com with SMTP id e132so520690pgc.5; Fri, 08 Jul 2022 21:21:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zmsBiF1bgWBH6D/tGpWmc727qWXK6kbebDM6d8nqWio=; b=XisW8uiAvzkDnOmdeVLfqYui4om1zOH9XYk55C8AaArgrrxwTvEK10ZyQ3+n72yG1v r7OqxnW5tlqC7d3mVu4RnljDsdNQZJYDP57CFCjhoHPXhdZn9lkikBGJ7XUaY0F503nZ F2qauaBXmMcmmWI9sbO9Udx1ceeNW8SO4MVUsJLJ8k4JjR10+uIhKLwwIgtCkVUhsUB8 5hn2eobGjEnFQyfQ8FkXgCtnLo0AMMfIlbKs4R7uzwgMU5gI7X3uBYCY/OC1CCYBQtpN qLBqQBJUnaj15a4+pOOTUAyMefpKOHPWtoaps2v2fTcDu6YrSePewYzpaMwOZdkzdG81 2ntw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zmsBiF1bgWBH6D/tGpWmc727qWXK6kbebDM6d8nqWio=; b=7ULy77E3VnxqG6mMCOQGBoWdd8N/lyotL+1OIV+zpIbSkBWeveitqKWM/mQgKazeOp eqBnj+5M44IaoU5V7xnCuvMBYtxzfg+207KcFPqNwv4ximF8aiO6b+mnxllyttfrMOzv A0WKndcc3qtGs31KcNKAasL9lG6t57TrFT6sHvZPksrRTqe3sXnA3hw1SkeATn9zNK8n SbwVtosEKjA2Yj/BacKTtvD6VXQxbx++u5pt4l+9R/oqQZdelUL+oCYm73BGt/6Qoa3P wnNPXpuISSGNcyglkh6CTCBIEylb6FyDxAlbHzBimv9e3pVNV82o3MFIJhE1WIS1vb/I 6UHg== X-Gm-Message-State: AJIora/hkT7MT7n/Wq0uHiQ+LjOafccFhRS6JrLPrwwe/cgujiuqgXI3 UQNqwJVvgPwLWHfIgjQ7sJs= X-Google-Smtp-Source: AGRyM1tkyFBwvw19aBJHDt9BeSGGHtV1veLf3x9y8MLe8GzuBWMBDDIr+0nazZ/DXDqPn/pKo9A1pw== X-Received: by 2002:a63:d94a:0:b0:412:6986:326e with SMTP id e10-20020a63d94a000000b004126986326emr6357310pgj.56.1657340480383; Fri, 08 Jul 2022 21:21:20 -0700 (PDT) Received: from debian.me (subs02-180-214-232-88.three.co.id. [180.214.232.88]) by smtp.gmail.com with ESMTPSA id x16-20020aa79a50000000b00528baea5dacsm392817pfj.201.2022.07.08.21.21.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 21:21:19 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id A18741039BB; Sat, 9 Jul 2022 11:21:11 +0700 (WIB) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Isaku Yamahata , Kai Huang , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Bagas Sanjaya , kernel test robot Subject: [PATCH 10/12] Documentation: x86: Enclose TDX initialization code inside code block Date: Sat, 9 Jul 2022 11:20:36 +0700 Message-Id: <20220709042037.21903-11-bagasdotme@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220709042037.21903-1-bagasdotme@gmail.com> References: <20220709042037.21903-1-bagasdotme@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org kernel test robot reported htmldocs warning on Documentation/x86/tdx.rst: Documentation/x86/tdx.rst:69: WARNING: Unexpected indentation. Documentation/x86/tdx.rst:70: WARNING: Block quote ends without a blank line; unexpected unindent. These warnings above are due to missing code block marker before TDX initialization code, which confuses Sphinx as normal block quote instead. Add literal code block marker to fix the warnings. Link: https://lore.kernel.org/linux-doc/202207042107.YqVvxdJz-lkp@intel.com/ Fixes: f05f595045dfc7 ("Documentation/x86: Add documentation for TDX host support") Reported-by: kernel test robot Signed-off-by: Bagas Sanjaya --- Documentation/x86/tdx.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/x86/tdx.rst b/Documentation/x86/tdx.rst index 6c6b09ca6ba407..4430912a2e4f05 100644 --- a/Documentation/x86/tdx.rst +++ b/Documentation/x86/tdx.rst @@ -62,7 +62,7 @@ use it as 'metadata' for the TDX memory. It also takes additional CPU time to initialize those metadata along with the TDX module itself. Both are not trivial. Current kernel doesn't choose to always initialize the TDX module during kernel boot, but provides a function tdx_init() to -allow the caller to initialize TDX when it truly wants to use TDX: +allow the caller to initialize TDX when it truly wants to use TDX:: ret = tdx_init(); if (ret) From patchwork Sat Jul 9 04:20:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bagas Sanjaya X-Patchwork-Id: 12912074 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C50AC43334 for ; Sat, 9 Jul 2022 04:21:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229685AbiGIEVm (ORCPT ); Sat, 9 Jul 2022 00:21:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53372 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbiGIEVX (ORCPT ); Sat, 9 Jul 2022 00:21:23 -0400 Received: from mail-pj1-x1036.google.com (mail-pj1-x1036.google.com [IPv6:2607:f8b0:4864:20::1036]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 784EF4E861; Fri, 8 Jul 2022 21:21:22 -0700 (PDT) Received: by mail-pj1-x1036.google.com with SMTP id z12-20020a17090a7b8c00b001ef84000b8bso3697633pjc.1; Fri, 08 Jul 2022 21:21:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=7862CG8gdBkkTAJc3wwQbEUsLZoydkrGNeAOeSolID4=; b=WYW4ChbpsRxZ1gJaxSIztXNft5qthK/2PeMQCA9WXhq4+rRV2J4W1LcAEdYKzA3XLa SIkvqry5SrQFEZCGaE7PZvtf4cnGRMqfjmeMxEVS2Lhr5Y+qKvdZISBgh81rs7UgJya9 SjP39SvaBQ741WGaKGKqTVbMmFpmJVuQqVatEEWFHPkQmB/itDoH9tAFVimcIludyvXA hxSqt5YCWJs3KtSjkHa/ZAu1V/ehd+qMWd+ucNdYwse0cuqGAsFhWvVra+tXOWrCEbt1 Tb97dcfZLxhaHMVgteSLnL+tmKsiOoQzS10NO2vCtZP9Yej1H0BRE0FDJzSDhTRsCWf6 mT6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=7862CG8gdBkkTAJc3wwQbEUsLZoydkrGNeAOeSolID4=; b=dl3sGte9tSZrD4jGHFbE2roRrAwOgwo4RIIF9WXFpQ6TQfS12aY5oJrqrQa0Mia5MO ovT9/+13d9NMFhuNOUS32mrSB9EeM2hhRMqZSSiI1fDTS1D6r/Vwdl1pBierMNGt5Vyd 2o/wLKc6228psiQUDywMWAbz2zFlfnBtibiqrH1Tf8qU0n6XiUuOJ4CgFGD3nkKP8y3f uMIyb0vYR4lrlxeyavUgXWnfU2PhZclQjIYiEbYQtdMU0qNfTrv/mifljpCuyUhoCPCq kEK+UzncRvFSKfA4VVxxlHVT601zMvwtpm7BTFu6zk2R/+CZVw+JGXDjZ5cs7u2N3UK8 VvHQ== X-Gm-Message-State: AJIora/ZeeEPyfuRRbpDEvPrfYuDs15Y7bv9WDYVIhK2Atqv7qFQPCNq 8ckPQXZ/xvisCaC8HdmPL98= X-Google-Smtp-Source: AGRyM1teRY0eMw7nwfVY9ar4a4cuXuk75JgTUr6H7bdIBeFb3SwU/a+Dpz1Q3Dg8E5U2dOvdY2szTg== X-Received: by 2002:a17:903:41d2:b0:16a:2cca:4869 with SMTP id u18-20020a17090341d200b0016a2cca4869mr7057894ple.13.1657340481995; Fri, 08 Jul 2022 21:21:21 -0700 (PDT) Received: from debian.me (subs02-180-214-232-88.three.co.id. [180.214.232.88]) by smtp.gmail.com with ESMTPSA id n17-20020a170902d2d100b0016c23c2c98dsm318286plc.246.2022.07.08.21.21.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 21:21:21 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id E05EB1039C8; Sat, 9 Jul 2022 11:21:11 +0700 (WIB) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Isaku Yamahata , Kai Huang , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Bagas Sanjaya Subject: [PATCH 11/12] Documentation: x86: Use literal code block for TDX dmesg output Date: Sat, 9 Jul 2022 11:20:37 +0700 Message-Id: <20220709042037.21903-12-bagasdotme@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220709042037.21903-1-bagasdotme@gmail.com> References: <20220709042037.21903-1-bagasdotme@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org The dmesg output blocks are using line blocks, which is incorrect, since this will render the blocks as normal paragraph with preserved line breaks instead of code blocks. Use literal code blocks instead for the output. Fixes: f05f595045dfc7 ("Documentation/x86: Add documentation for TDX host support") Signed-off-by: Bagas Sanjaya --- Documentation/x86/tdx.rst | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Documentation/x86/tdx.rst b/Documentation/x86/tdx.rst index 4430912a2e4f05..f5bd22b89159ec 100644 --- a/Documentation/x86/tdx.rst +++ b/Documentation/x86/tdx.rst @@ -41,11 +41,11 @@ TDX boot-time detection ----------------------- Kernel detects TDX and the TDX private KeyIDs during kernel boot. User -can see below dmesg if TDX is enabled by BIOS: +can see below dmesg if TDX is enabled by BIOS:: -| [..] tdx: SEAMRR enabled. -| [..] tdx: TDX private KeyID range: [16, 64). -| [..] tdx: TDX enabled by BIOS. + [..] tdx: SEAMRR enabled. + [..] tdx: TDX private KeyID range: [16, 64). + [..] tdx: TDX enabled by BIOS. TDX module detection and initialization --------------------------------------- @@ -79,20 +79,20 @@ caller. User can consult dmesg to see the presence of the TDX module, and whether it has been initialized. -If the TDX module is not loaded, dmesg shows below: +If the TDX module is not loaded, dmesg shows below:: -| [..] tdx: TDX module is not loaded. + [..] tdx: TDX module is not loaded. If the TDX module is initialized successfully, dmesg shows something -like below: +like below:: -| [..] tdx: TDX module: vendor_id 0x8086, major_version 1, minor_version 0, build_date 20211209, build_num 160 -| [..] tdx: 65667 pages allocated for PAMT. -| [..] tdx: TDX module initialized. + [..] tdx: TDX module: vendor_id 0x8086, major_version 1, minor_version 0, build_date 20211209, build_num 160 + [..] tdx: 65667 pages allocated for PAMT. + [..] tdx: TDX module initialized. -If the TDX module failed to initialize, dmesg shows below: +If the TDX module failed to initialize, dmesg shows below:: -| [..] tdx: Failed to initialize TDX module. Shut it down. + [..] tdx: Failed to initialize TDX module. Shut it down. TDX Interaction to Other Kernel Components ------------------------------------------ @@ -143,10 +143,10 @@ There are basically two memory hot-add cases that need to be prevented: ACPI memory hot-add and driver managed memory hot-add. The kernel rejectes the driver managed memory hot-add too when TDX is enabled by BIOS. For instance, dmesg shows below error when using kmem driver to -add a legacy PMEM as system RAM: +add a legacy PMEM as system RAM:: -| [..] tdx: Unable to add memory [0x580000000, 0x600000000) on TDX enabled platform. -| [..] kmem dax0.0: mapping0: 0x580000000-0x5ffffffff memory add failed + [..] tdx: Unable to add memory [0x580000000, 0x600000000) on TDX enabled platform. + [..] kmem dax0.0: mapping0: 0x580000000-0x5ffffffff memory add failed However, adding new memory to ZONE_DEVICE should not be prevented as those pages are not managed by the page allocator. Therefore, From patchwork Sat Jul 9 04:20:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bagas Sanjaya X-Patchwork-Id: 12912075 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9014CCA47C for ; Sat, 9 Jul 2022 04:21:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229457AbiGIEVp (ORCPT ); Sat, 9 Jul 2022 00:21:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229637AbiGIEVY (ORCPT ); Sat, 9 Jul 2022 00:21:24 -0400 Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E817D643EC; Fri, 8 Jul 2022 21:21:23 -0700 (PDT) Received: by mail-pg1-x52a.google.com with SMTP id r22so532795pgr.2; Fri, 08 Jul 2022 21:21:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=V/wDVdyPPVBcB1yefKcLd5sdm0T+4PqhqJ52IFO1R5I=; b=Mq9Vi3/OJ12uq6CB3rPI5R6hgkYuMpLlHO3QMykGnT8/OwPpXe+YLMNJ/KJB+0EKBl DA+8lCxBgVoiT0x34zZw7DRLabxDMqBMYGhe0BS4uB05Alp44GFS8Zg1nO/9hxdG0aHn hWa4XeUeEPC4eIIbHLRn6OCxt7FPauItFDqURA6ME/0BsYeM9unBKFk4xcMKcxpUwLQQ 9esXoY3Ty02zxYe0qOmypoyhqiMaqy3848l5lYYtbbrRnpc+raeeeDTdRzHetxUopfJf 6Ldwvfk4LcyG+YwtpV6KZo8Mmkdkb9Z0fox2g0+vpxa8VY/wTiPDJMxUWe+SGDxlaV3V MPew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=V/wDVdyPPVBcB1yefKcLd5sdm0T+4PqhqJ52IFO1R5I=; b=SdhsfwgRNfp52ckF7tpVaLLBRp9pquQyIm9cHYLS4pgC86tVxXzgkUjXTIxZNUdcYj 6eAgtUoiZAbA31BGDueyJaw+t+Yn9EcyOVdPvhiomE+U7nDTmXA2xrXkK5F2qJy0LV3B VIMm6p2ZQ8rObxIUN3jGmSeYrUGdGRw6vRI2sjyag+wI0/fX59eCCPsW2cAqWtdykh6C tsPIFSPJkxwL5BnnRqPdkAbYRfMcaS+c/tlJseUOy8j3fZwHK2AlaGojwRFSoYs8yCMq X9W89lqvafMTK6mc1eEdKsY/GqjZaGDUyoSDRqQRHqYoWY3BVwu19+Gf3OiXqZeeZ0xt ZgUw== X-Gm-Message-State: AJIora+YtBSutEJaz1ROBCu/Z451gbRowyHGQPDiYtPMpZxQmnb45JRo 5VrAhGACpd27NPmu85Enlv0= X-Google-Smtp-Source: AGRyM1seTB3wYYjlVq9trAZ01j1wiacWJMkiimYvYccMbc+uIihWK6yIR/pj2gHPY259ns+As8O0oA== X-Received: by 2002:a63:c21:0:b0:412:22fa:6cdb with SMTP id b33-20020a630c21000000b0041222fa6cdbmr5940431pgl.423.1657340483479; Fri, 08 Jul 2022 21:21:23 -0700 (PDT) Received: from debian.me (subs02-180-214-232-88.three.co.id. [180.214.232.88]) by smtp.gmail.com with ESMTPSA id d8-20020a17090a7bc800b001efa332d365sm236966pjl.33.2022.07.08.21.21.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Jul 2022 21:21:21 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id 0D7101039BC; Sat, 9 Jul 2022 11:21:11 +0700 (WIB) From: Bagas Sanjaya To: linux-doc@vger.kernel.org Cc: Paolo Bonzini , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Isaku Yamahata , Kai Huang , x86@kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Bagas Sanjaya Subject: [PATCH 12/12] Documentation: kvm: Add TDX documentation to KVM table of contents Date: Sat, 9 Jul 2022 11:20:38 +0700 Message-Id: <20220709042037.21903-13-bagasdotme@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220709042037.21903-1-bagasdotme@gmail.com> References: <20220709042037.21903-1-bagasdotme@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org TDX documentation files under Documentation/virt/kvm/ are missing from the table of contents index. Add the missing entries. Fixes: 471b5bf12a3728 ("[MARKER] The start of TDX KVM patch series: TDX architectural definitions") Fixes: 9e54fa1ac03df3 ("Documentation/virtual/kvm: Document on Trust Domain Extensions(TDX)") Fixes: 7af4efe3263854 ("KVM: x86: design documentation on TDX support of x86 KVM TDP MMU") Signed-off-by: Bagas Sanjaya --- Documentation/virt/kvm/index.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Documentation/virt/kvm/index.rst b/Documentation/virt/kvm/index.rst index e0a2c74e1043a0..f368a4625aa902 100644 --- a/Documentation/virt/kvm/index.rst +++ b/Documentation/virt/kvm/index.rst @@ -18,3 +18,7 @@ KVM locking vcpu-requests review-checklist + + intel-tdx + intel-tdx-layer-status + tdx-tdp-mmu