Received: by 2002:a05:6358:e9c4:b0:b2:91dc:71ab with SMTP id hc4csp4321406rwb; Sun, 7 Aug 2022 21:21:41 -0700 (PDT) X-Google-Smtp-Source: AA6agR5oahtIe2jI/fShY435GZJFjCYXuNTUdH/3IooUeabVy3HM+BVZVtdEWmdBuYLBGXLuTLaz X-Received: by 2002:a17:902:e890:b0:170:c2f:cb4d with SMTP id w16-20020a170902e89000b001700c2fcb4dmr11459705plg.114.1659932501418; Sun, 07 Aug 2022 21:21:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659932501; cv=none; d=google.com; s=arc-20160816; b=wBshIlo47h9lZYn3irQP23a3H2utXB/vitD0qmb6WW+Up96MbhMQaKgutDJSUiMkBw 7v5tUdcYu3Zn/IOxV8a6qKdgEoN1lCGB94u3yH/9ySztBTvQl+xz2T2jARsGMrFeLIem WARRHLY+xF468fOfs7vDO9Gfl0U1egHNdFPimU/t9P+1G1oL1J5a62oaulUqIiM5kYTP 6GirdtA22ObIQNZD0kth6rDSdE+EkMqR0paIJ+JtUtDsmsuH4otneUDoiIbFZ58ZNZv+ WcHffbtux7akZwpsIaa4a51n64tJKEspgF5/I9X3g/qotazRLu34zAF5qHyeMLhoE5h8 BK/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bKYnCu9pm/upzkFb2rqM0O6IeVnkl0xkaP6BrnNiWiw=; b=jCER8SXfC9LcVdo2hy/oLLp3apj+CYkBZrg4Rky/o/0HN3BYOi/kLSM4Sk6Ih8j5TB gQx4FM/lrb05j6YZZiodPt5+0MXwm0rF3tIawc8/PFMr8sB3wID8fekXvqIZdbtVhMDG TwQ9Hk8FAfP8S+brITE+fVUZtPf9j1lFKg43Hwpysb2gk64caYKunEz1uMAHC7f5LSYZ 2nfsJjkhQcsNh4yccS5X3X5My/jJaokvaC/bi02yWlxYV2m58uF71eX1u5WOgpot9XU0 mLRuPR/l5Sd42NDWJCF0sNnNI+/+iEi2SpXUc45azB1kXSHPW67T+SVtygz6ltlCz6sd Ik8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YBJPrJES; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g21-20020a056a000b9500b0052cef42e7ebsi11029225pfj.348.2022.08.07.21.21.28; Sun, 07 Aug 2022 21:21:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=YBJPrJES; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235068AbiHHDr1 (ORCPT + 99 others); Sun, 7 Aug 2022 23:47:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43058 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234847AbiHHDrY (ORCPT ); Sun, 7 Aug 2022 23:47:24 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9632101C4; Sun, 7 Aug 2022 20:47:23 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id u133so7059423pfc.10; Sun, 07 Aug 2022 20:47:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=bKYnCu9pm/upzkFb2rqM0O6IeVnkl0xkaP6BrnNiWiw=; b=YBJPrJESmEquNKfQZ/vBt+maelA+mPuN6dwEDskoVT3pmUQm9rt82jf9slr69uh/bW yd8ybu1hVs9Q2EzvXD7x5TETl+3O+YP0ggKWgUfR007GhGwChqaOS2xGH4fI+yqJiW8I I1QdHnAag4OwtDWP8oLSvwF7qvVE4CW7WdutJk8Z5D73s9+GpJw2LbCNm0F+4mRvsZ0I xhWfA1W22N5cjAN7cVCsh+j8AO4fHnx+rPFhsMkibo4bAuPe+jjS6tjWJ3UkNEyhbA5L dPiLu4ZpqPjLcOx63NJLYqFLgHyqE78U8XnsG/+kSz2lSr3NB6WLa9h7ldyhI0hyvC+0 Y3mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=bKYnCu9pm/upzkFb2rqM0O6IeVnkl0xkaP6BrnNiWiw=; b=eMQvmjBYSttGSSKVW8Eo0ogD2+gD5ruODECEBdZ7DAyavwC4AymP4RH6pXmiBZzdCM Nhb2lTFTH0DmE+T82FOPAHmQui7zbuNmB5X+qHOirYUAS0BAQy0qlQEJ7N/8T+jEm9BT mT6mnTsvJMaZ+IgvjJbEEVtgVe2toYweX6iIFRk9+ToCgdbEcqTlqG7q5rJETKUkegwo zoivuZCiO8PJNH3eXSWZU7xb3gNx7hIZDzl3GGvKbWKcq7xV3444nNyhFls3+UibLSJn MO4R94p91nMo3/NRmUyHILN6W6SJFM72m8jrCxeRXKVuPnmrGgOo0NtGu35cWvbDPCAF Vy6A== X-Gm-Message-State: ACgBeo11c7WHaE0/SJBaAYJo9VNJ9BSVGToR+M43Pw0HFiFPByfmyqt0 rDnX7SXsYUAXAJcgHG0e2a8= X-Received: by 2002:a63:5148:0:b0:41d:6628:80a3 with SMTP id r8-20020a635148000000b0041d662880a3mr3957991pgl.359.1659930443309; Sun, 07 Aug 2022 20:47:23 -0700 (PDT) Received: from debian.me (subs02-180-214-232-85.three.co.id. [180.214.232.85]) by smtp.gmail.com with ESMTPSA id d8-20020aa797a8000000b00528c8ed356dsm7565212pfq.96.2022.08.07.20.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Aug 2022 20:47:22 -0700 (PDT) Received: by debian.me (Postfix, from userid 1000) id 056671039EA; Mon, 8 Aug 2022 10:47:18 +0700 (WIB) Date: Mon, 8 Aug 2022 10:47:18 +0700 From: Bagas Sanjaya To: isaku.yamahata@intel.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, isaku.yamahata@gmail.com, Paolo Bonzini , erdemaktas@google.com, Sean Christopherson , Sagi Shahar Subject: Re: [PATCH v8 000/103] KVM TDX basic feature support Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha384; protocol="application/pgp-signature"; boundary="mo0AN5RiRVHwqA1Y" Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --mo0AN5RiRVHwqA1Y Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Aug 07, 2022 at 03:00:45PM -0700, isaku.yamahata@intel.com wrote: > From: Isaku Yamahata >=20 > KVM TDX basic feature support >=20 > Hello. This is v8 the patch series vof KVM TDX support. > This is based on v5.19-rc8 + kvm/queue branch + TDX HOST patch series. > The tree can be found at https://github.com/intel/tdx/tree/kvm-upstream > How to run/test: It's describe at https://github.com/intel/tdx/wiki/TDX-K= VM >=20 > Major changes from v7: > - Use xarray to track whether GFN is private or shared. Drop SPTE_SHARED_= MASK. > The complex state machine with SPTE_SHARED_MASK was ditched. > - Large page support is implemented. But will be posted as independent RF= C patch. > - fd-based private page v7 is integrated. This is mostly same to Chao's p= atches. > It's in github. >=20 > Thanks, > Isaku Yamahata >=20 Hi, thanks for the series. When building htmldocs, I found new warnings: Documentation/x86/tdx.rst:69: WARNING: Unexpected indentation. Documentation/x86/tdx.rst:70: WARNING: Block quote ends without a blank lin= e; unexpected unindent. Documentation/virt/kvm/tdx-tdp-mmu.rst: WARNING: document isn't included in= any toctree I have applied the fixup (also with line blocks to code blocks conversion): diff --git a/Documentation/virt/kvm/index.rst b/Documentation/virt/kvm/inde= x.rst index cdb8b43ce7970a..ff2db9ab428d3c 100644 --- a/Documentation/virt/kvm/index.rst +++ b/Documentation/virt/kvm/index.rst @@ -20,3 +20,4 @@ KVM review-checklist =20 intel-tdx + tdx-tdp-mmu diff --git a/Documentation/x86/tdx.rst b/Documentation/x86/tdx.rst index 6c6b09ca6ba407..34f0b9e5ee5678 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 a= dditional 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:: =20 ret =3D tdx_init(); if (ret) @@ -79,20 +79,20 @@ caller. User can consult dmesg to see the presence of the TDX module, and whether it has been initialized. =20 -If the TDX module is not loaded, dmesg shows below: +If the TDX module is not loaded, dmesg shows below:: =20 -| [..] tdx: TDX module is not loaded. + [..] tdx: TDX module is not loaded. =20 If the TDX module is initialized successfully, dmesg shows something -like below: +like below:: =20 -| [..] 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. =20 -If the TDX module failed to initialize, dmesg shows below: +If the TDX module failed to initialize, dmesg shows below:: =20 -| [..] tdx: Failed to initialize TDX module. Shut it down. + [..] tdx: Failed to initialize TDX module. Shut it down. =20 TDX Interaction to Other Kernel Components ------------------------------------------ @@ -143,10 +143,10 @@ There are basically two memory hot-add cases that nee= d 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:: =20 -| [..] tdx: Unable to add memory [0x580000000, 0x600000000) on TDX enable= d 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 =20 However, adding new memory to ZONE_DEVICE should not be prevented as those pages are not managed by the page allocator. Therefore, Thanks. --=20 An old man doll... just what I always wanted! - Clara --mo0AN5RiRVHwqA1Y Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iJUEABMJAB0WIQTsebsWCPCpxY9T92n/R0PGQ3AzwAUCYvCHOwAKCRD/R0PGQ3Az wOKRAYDoUs/UsE1xGxTc3HJtDisFuUa8l2g1WXkFhZ3kO2GwJGXqaEalUVN8lVgc pGzwr4oBgKV92B34ny7L+15t9Rwif9EYIhvPAVr1DisL9rWois+XSFEDpx8C8i3Q fgB2HD60nw== =nHRq -----END PGP SIGNATURE----- --mo0AN5RiRVHwqA1Y--