Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp749335imi; Thu, 21 Jul 2022 10:09:35 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tSOc/DqitmGFxCKnCMJcxX8Gqg6GE1QW7wmal8OiNkK4tX+lj020EQ7dfMRCJ3DBv3dR/u X-Received: by 2002:a17:903:11d2:b0:167:8a0f:8d33 with SMTP id q18-20020a17090311d200b001678a0f8d33mr45189183plh.95.1658423375298; Thu, 21 Jul 2022 10:09:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658423375; cv=none; d=google.com; s=arc-20160816; b=0lDbRNHwrWnsxtMdQfTU78Z6ra1NvkAMYhwpIy0+8y03DLjDTxvfAOdQFpUzpsd0aK RSK51wIN7Y5wZH40vMQfTOdzO4FWHk/Qo1/UmEDNoBaWetwbfGTD3tkmvbkZ4E4ZnHBu /4RrEshshP753LE2Q8UOTnZMdYhX/6Nb2RqnaAWmMeIveRdir95DD4KzfsO5KM4LM60B iHvVAQZ/53DugxEGJa/zl7O2uXI7Myc4rRfUGetN9O+h/a/7FOodfa9VhINP0TFLoDXQ 0im+NXM97l5IvUNIld5x5yen9z6Gt7J8Ugf4/QIz7euQ9OV163ddjzUgnTuFq7J2pX80 Q5/Q== 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=BVrCpmZzGCEp7F6E1u8UQ2x0UyFEElG0E4fGdgrUd1c=; b=rEKfGo6+ENVj81HwexhnnjCRoDRGdDcHhmDb9sLbaIbX2TUP7n9Ju2DZr+2MGjJEgN 1CeRYLuHg2PNfAyirpJwgxKNorIHunumSU7mF0thni0fS9Pb9zvB/KlX5i/dIhj9ccGK LMxaXLohKzoYao0UKu9kEJFgZcTG2NVTGfjV0Spv33LBv3HcRY5EpOgu5Z4vQTje8bwo i/vuTo0s83aL+jmGxfuRg4ZgF7TlblEmqvL2Uqx1m9uiYDNlArlLEwC2iahs9/9DKSBK M6uOspdFqnGntGNavD+DL8OFs6RjpkpuBPgFcCMonW1flMKSkZ8EpTma0rT5aR7XFJHM CAzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=echIodlm; 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 j27-20020a63551b000000b00411f9246bbasi2673462pgb.484.2022.07.21.10.09.19; Thu, 21 Jul 2022 10:09:35 -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=echIodlm; 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 S229565AbiGUREy (ORCPT + 99 others); Thu, 21 Jul 2022 13:04:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37750 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229449AbiGUREw (ORCPT ); Thu, 21 Jul 2022 13:04:52 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3621E691FD for ; Thu, 21 Jul 2022 10:04:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658423091; x=1689959091; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=0PJdUtRNz1ps3/mVqAp7w0q1s+ILafhchr3FLLZ7DE4=; b=echIodlm+yfJpPV9ay+7OTriM8kZmiXZt3qef5OxQscrQ+jxoPiQj/n0 N7aUZbpzNmVrZum6HZJ6jkWw3df4VbwLC/ckn+55G/Jmq0oxXK90bMyUD Rl5FpAYIFfJfV3i7xa0dHG4lkWHAMhW2z+OzWPfwZKpUW2V1eWvwNoizD Wut6PJacNg2FEowArxPQH2XH8zztgOmjH8vJWVrDHddjYcGtKc97UyTdm KM0JkSVdogDjLl/7PmG4I0EwWZO3OAZ+WKXio8Jpj+IUm4pvav4UWhTV4 XrryIJUOdO2bmBRbfbnkgxDuXIABykb/ZBIauMSkLQi9a32O5M9Qw+MIp Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10415"; a="287859859" X-IronPort-AV: E=Sophos;i="5.93,183,1654585200"; d="scan'208";a="287859859" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2022 10:02:06 -0700 X-IronPort-AV: E=Sophos;i="5.93,183,1654585200"; d="scan'208";a="573820533" Received: from vasantgx-mobl.amr.corp.intel.com (HELO [10.212.244.191]) ([10.212.244.191]) by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2022 10:02:05 -0700 Message-ID: Date: Thu, 21 Jul 2022 10:02:05 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH v8 5/5] x86/tdx: Add Quote generation support Content-Language: en-US To: Sathyanarayanan Kuppuswamy , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Cc: "H . Peter Anvin" , "Kirill A . Shutemov" , Tony Luck , Andi Kleen , Kai Huang , Wander Lairson Costa , Isaku Yamahata , marcelo.cerri@canonical.com, tim.gardner@canonical.com, khalid.elmously@canonical.com, philip.cox@canonical.com, linux-kernel@vger.kernel.org References: <20220609025220.2615197-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20220609025220.2615197-6-sathyanarayanan.kuppuswamy@linux.intel.com> <214e24f0-5236-be8d-024a-da48737d854a@intel.com> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_NONE 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 On 7/21/22 09:54, Sathyanarayanan Kuppuswamy wrote: > > On 7/21/22 9:49 AM, Dave Hansen wrote: >> On 7/21/22 09:42, Sathyanarayanan Kuppuswamy wrote: >>> On 7/21/22 9:08 AM, Dave Hansen wrote: >>>> On 6/8/22 19:52, Kuppuswamy Sathyanarayanan wrote: >>>>> For shared buffer allocation, alternatives like using the DMA API is >>>>> also considered. Although it simpler to use, it is not preferred because >>>>> dma_alloc_*() APIs require a valid bus device as argument, which would >>>>> need converting the attestation driver into a platform device driver. >>>>> This is unnecessary, and since the attestation driver does not do real >>>>> DMA, there is no need to use real DMA APIs. >>>> Let's actually try to walk through the requirements for the memory >>>> allocation here. >>>> >>>> 1. The guest kernel needs to allocate some guest physical memory >>>> for the attestation data buffer >>> Physically contiguous memory. >> Remind me how large the quote structures are. > It depends on the attestation service. In addition to TDREPORT (1K size), > during quote generation, additional data can be included in the signed > quote. So the spec allows variable length. User agent will communicate with > attestation service to identify the appropriate buffer length. Our test > uses 8K buffers What is this "additional data"? Is that "REPORTDATA" from the TDX module spec? "Additional REPORTDATA, a 64-byte value, is provided by the guest TD to be included in the TDG.MR.REPORT."