Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp754833imi; Thu, 21 Jul 2022 10:15:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uYX69GVYiUcnKH1ahBCwN3YU0l7pmkR0vB/7tRivnl81zsvvKoE+HwHn8uANP2TF0+DuIT X-Received: by 2002:a05:6402:239f:b0:43a:92a7:84e with SMTP id j31-20020a056402239f00b0043a92a7084emr59516342eda.293.1658423730136; Thu, 21 Jul 2022 10:15:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658423730; cv=none; d=google.com; s=arc-20160816; b=ojbANX3undEsX5Jcd3ezhHtT9XwWr0XIaiNdHzz7Q1105Hc7pY9rNcEy1E5UPtltAB 8n2mHQd4osZieCI8jHaVtZ7ePNuQu/xJSVeNQyjETekqCsTgwkgEWDhrm88jCrgby8oy eK6O1nntcfp6Igsdy0EOA0G1CPG9faResoWgvgHXNKk8Op46lBfFBNSXgwp6tAYyemu7 mMO0F7RGTexg8oXDmIaopzRvfCO41SYyPe/FlpZoKunI/lUaNVizgzP03dj8Cy4ejhWm BRM0bpt+NY4zW1oYKMiPKqqOcBpzRnLjdRW2bRxQdnPGnBsqGIJhcBuV1tyaPjue6hhK sFrQ== 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=Jm9GIihs1YYxw7fSjs9G5GBT4ofLXNhISvb7pCM04zo=; b=Un+deUzDWsPO96AKtIpYyAl6VycSOccHOdSHo2S2h/OkKSiqBZFBvGOGi25iRCl2fz p07rS8xUdSkNAukCipAboCQ82oKGLgPimoPT3dNeveayaHOzBRgIXl/zHe/j+svVWDin w+0/Sa/9PHy8N29Sriaho9ATXMYx70B/0yvhiASk7azClftVY5hKXAn88oMSS/gnpjFI Q0M5HxRtNB2mStsKyRviL+99D9h8YBzXQldKrCDMiTNOZ86eaJdnyweyvThDvtLBCgvn noIcBoV7ZiMynDzhHPXdAOPQZ69+7MPzALxIetrdi4RR5IZGuwlaqH5hkkoNb8LUpSs0 8O/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=UREeurL3; 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 dm14-20020a05640222ce00b0043a137576e3si2685321edb.510.2022.07.21.10.15.05; Thu, 21 Jul 2022 10:15:30 -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=UREeurL3; 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 S231837AbiGUQyx (ORCPT + 99 others); Thu, 21 Jul 2022 12:54:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229786AbiGUQyw (ORCPT ); Thu, 21 Jul 2022 12:54:52 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFEB78BAA5 for ; Thu, 21 Jul 2022 09:54: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=1658422491; x=1689958491; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=hL+J5JjvVKr6ukjI38R7LPtkPgTUZUt7lBMJtyofLVc=; b=UREeurL3qXBJjVVZ4Ub8CoyaSTfvmWZlDp/wlePbIHXXPiU9uxs/IPEv +68OHzJ2MjI84s5xzBkyhdLfx4FVVptP66TclsXYAcwl1UBxqQNXSRFmC yY0QIOLEobDSPALFblkP0fQTUyui3szTzm3YQdR34yrWxXkBz2xvFrmPy N7QmET/AqWt4lu7+V/2OLzQYT2ifQX/BZvFZ2Lg+bbIxfSLKCJEZIYRWc TDuX0sIGnicl3bimf1FL2GrK3BcBiokrFuDc1Mtp+EOZvJF9NR0TV18pD /c7J+tF0M9WAyGM+3u6yGTlofig4wd/QNBPXZkG+WaG9J0DmYHQ28XKYm g==; X-IronPort-AV: E=McAfee;i="6400,9594,10415"; a="348802926" X-IronPort-AV: E=Sophos;i="5.93,183,1654585200"; d="scan'208";a="348802926" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2022 09:54:51 -0700 X-IronPort-AV: E=Sophos;i="5.93,183,1654585200"; d="scan'208";a="598531758" Received: from sattaran-mobl1.amr.corp.intel.com (HELO [10.212.246.186]) ([10.212.246.186]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jul 2022 09:54:51 -0700 Message-ID: Date: Thu, 21 Jul 2022 09:54:51 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.11.0 Subject: Re: [PATCH v8 5/5] x86/tdx: Add Quote generation support Content-Language: en-US To: Dave Hansen , 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: Sathyanarayanan Kuppuswamy In-Reply-To: <214e24f0-5236-be8d-024a-da48737d854a@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.0 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 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 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. > -- Sathyanarayanan Kuppuswamy Linux Kernel Developer