Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp6598526rwr; Tue, 9 May 2023 18:23:18 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4iXdu+VhSnNJNDeI4STK1jrjuLPFA36aaYohSzNc9hwDyoHqa19WeUqT+IhpszEYivxbm/ X-Received: by 2002:a17:903:22cd:b0:1aa:ebcc:dd5e with SMTP id y13-20020a17090322cd00b001aaebccdd5emr18973279plg.65.1683681798067; Tue, 09 May 2023 18:23:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683681798; cv=none; d=google.com; s=arc-20160816; b=jJDyd25tc+1HIOaAadUAg4tG5NrkYaEc5frI7Qw8Mc4Er3ITRMqvd93EqPLoPyMVuQ k2BBVUG0mD1Rgy41pYssJvremFPCdirsrNvbLwQAg7DgMqwsq7iTXSpBcgvZPqLMxynW vP+ys0xForOxRjT19K6TI/xuRJDXQ3p8/XMncgYpdJ7sQ1ih/2ewUuZMuUGLlnTOvIAV cATEgOwz+Qj815Up02FlpICr0dQQ8CA48Z4qybru7mCqn4OLscIB1xC1bXYyVwuFWAXP CNeXFZf9+TVp1qHNJJp0vuwYU/CezO7Gf/NY/o3UGlRweipzv5QCUgkY+xxzq5ISN+Zf iMqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=ukBMdA4X3DONRjvBI0o5WpHjyFG8OImomSmmKcCsQN8=; b=Zq+em2nwdJLZfynGKgeRdjx8MxJNGDnm9IeMuAqZiNYgIBYQkwpDOOc9+8hmwPibo4 JPaGU5fy0t+TiXtbVjDz/TBf+EQKBenYlyABSQY0fUnaEJtcIqtVpBVWGHS+lfwrD34K 9ptwQArcuLp176bmpSB8aF5xaU14R6I6Z20PKUqp5Tn8TfqkTg1XujZQXjjeT/1vMlQU 7lUX1R0/0Dh/s3EvIryE/jvTq6t/gyrb+z/YYJjnp0VLzfbdrDztttjNub/oDJcVke7a sr0ReBYuQ+QSJHwsFPnP9OCFMBr+9SUhV+7WchgMOTusrLeMN5BuPwFrjWLSO8qiPP/p HJrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UoLFIIBE; 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=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a4-20020a17090a854400b0024e35ef410fsi17782535pjw.131.2023.05.09.18.23.03; Tue, 09 May 2023 18:23:18 -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=@intel.com header.s=Intel header.b=UoLFIIBE; 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=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235177AbjEJAOM (ORCPT + 99 others); Tue, 9 May 2023 20:14:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235140AbjEJAOK (ORCPT ); Tue, 9 May 2023 20:14:10 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61DA010D1; Tue, 9 May 2023 17:14:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1683677649; x=1715213649; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=hulJYVB8DZm3nhi56FEUJQG0G5POBNv9VjOvpsYYdI4=; b=UoLFIIBEHebPw4rtV8j6f1zqEF+jMfDNgV1zpN5EagR07QPlKDyj7NAr XEpdT3lhc/TBYtBpvR7Z/R51MgBw8AFOMBJwc7Vwj7n+iNFtWZAV5+c4f otT8VS5GUw+ThH4SjMrjZ3Glofw2h5SyrYu4AULKNp1pqq1+ZimLXy/7n uAY1OnNCOnBEh28Kw3mEw3X63mlO6n/QzP5xYNulMX/nvbmklU6v3B4Lb 0CKVdAS9qCa9DE16jmRI13Cs4Mr2bHmpe+CqXbf2vt1PBvpNdHqMfHyJh Q0afXISK5k15Ldvc+jSKk6Ti/wrGIh4NrZTDavc0NwtVjj+TL5GWOmwpl A==; X-IronPort-AV: E=McAfee;i="6600,9927,10705"; a="348923935" X-IronPort-AV: E=Sophos;i="5.99,263,1677571200"; d="scan'208";a="348923935" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2023 17:14:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10705"; a="1028998897" X-IronPort-AV: E=Sophos;i="5.99,263,1677571200"; d="scan'208";a="1028998897" Received: from kvnguye3-mobl1.amr.corp.intel.com (HELO [10.212.145.31]) ([10.212.145.31]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 May 2023 17:14:08 -0700 Message-ID: <1a1f1f9e-a13b-3d5f-5b30-944bb108af67@linux.intel.com> Date: Tue, 9 May 2023 17:14:00 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0 Thunderbird/102.10.0 Subject: Re: [PATCH v2 0/3] TDX Guest Quote generation support Content-Language: en-US To: Erdem Aktas Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Shuah Khan , Jonathan Corbet , "H . Peter Anvin" , "Kirill A . Shutemov" , Tony Luck , Wander Lairson Costa , Dionna Amalie Glaze , Chong Cai , Qinkun Bao , Guorui Yu , Du Fan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org References: <20230413034108.1902712-1-sathyanarayanan.kuppuswamy@linux.intel.com> From: Sathyanarayanan Kuppuswamy In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 Hi Erdem, On 5/9/23 5:10 PM, Erdem Aktas wrote: > On Wed, Apr 12, 2023 at 8:42 PM Kuppuswamy Sathyanarayanan > wrote: >> >> Hi All, >> >> In TDX guest, the attestation process is used to verify the TDX guest >> trustworthiness to other entities before provisioning secrets to the >> guest. >> >> The TDX guest attestation process consists of two steps: >> >> 1. TDREPORT generation >> 2. Quote generation. >> >> The First step (TDREPORT generation) involves getting the TDX guest >> measurement data in the format of TDREPORT which is further used to >> validate the authenticity of the TDX guest. The second step involves >> sending the TDREPORT to a Quoting Enclave (QE) server to generate a >> remotely verifiable Quote. TDREPORT by design can only be verified on >> the local platform. To support remote verification of the TDREPORT, >> TDX leverages Intel SGX Quoting Enclave to verify the TDREPORT >> locally and convert it to a remotely verifiable Quote. Although >> attestation software can use communication methods like TCP/IP or >> vsock to send the TDREPORT to QE, not all platforms support these >> communication models. So TDX GHCI specification [1] defines a method >> for Quote generation via hypercalls. Please check the discussion from >> Google [2] and Alibaba [3] which clarifies the need for hypercall based >> Quote generation support. This patch set adds this support. > > > Thanks Kuppuswamy for the v2 of this patch set. > I reviewed all 3 patches and it looks good for me and it covers our use cases. Thanks for the review. I will address other reviewers comments and resubmit v3 this week. I will include your Reviewed-by in it. > >> >> Support for TDREPORT generation already exists in the TDX guest driver. >> This patchset extends the same driver to add the Quote generation >> support. >> >> Following are the details of the patch set: >> >> Patch 1/3 -> Adds event notification IRQ support. >> Patch 2/3 -> Adds Quote generation support. >> Patch 3/3 -> Adds selftest support for Quote generation feature. >> >> [1] https://cdrdv2.intel.com/v1/dl/getContent/726790, section titled "TDG.VP.VMCALL". >> [2] https://lore.kernel.org/lkml/CAAYXXYxxs2zy_978GJDwKfX5Hud503gPc8=1kQ-+JwG_kA79mg@mail.gmail.com/ >> [3] https://lore.kernel.org/lkml/a69faebb-11e8-b386-d591-dbd08330b008@linux.alibaba.com/ >> >> Kuppuswamy Sathyanarayanan (3): >> x86/tdx: Add TDX Guest event notify interrupt support >> virt: tdx-guest: Add Quote generation support >> selftests/tdx: Test GetQuote TDX attestation feature >> >> Documentation/virt/coco/tdx-guest.rst | 11 ++ >> arch/x86/coco/tdx/tdx.c | 196 +++++++++++++++++++ >> arch/x86/include/asm/tdx.h | 8 + >> drivers/virt/coco/tdx-guest/tdx-guest.c | 168 +++++++++++++++- >> include/uapi/linux/tdx-guest.h | 43 ++++ >> tools/testing/selftests/tdx/tdx_guest_test.c | 68 ++++++- >> 6 files changed, 487 insertions(+), 7 deletions(-) >> >> -- >> 2.34.1 >> -- Sathyanarayanan Kuppuswamy Linux Kernel Developer