Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp784792pxb; Thu, 21 Apr 2022 10:12:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0SKuftderhx0IsLAfmIKVHJTAE1Ia/s7yEC70k13R3hpKTgI2AfFo4D109bFrwWSfVQUU X-Received: by 2002:a63:4e:0:b0:39d:7212:84fc with SMTP id 75-20020a63004e000000b0039d721284fcmr401211pga.220.1650561176540; Thu, 21 Apr 2022 10:12:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650561176; cv=none; d=google.com; s=arc-20160816; b=N/HLMurmmYQfXUU2qY5wmmj6RyldrxeF5cdi4n7RaJ9oHnvPeBJ6XFj+d/cjcFFoBU /YlwYGfGj+xDBEdDSwalf/eyyqNNFvk+p31aPyRPrBBDLJn4KgTzvqQPv8FqzdZPP2Jc ziAc0ufNaWqWpRGEUPRJDGRLT0XZ8d8dYHYTL3xtrnsiplRxpUcQeUky7UM7Df3/Aegr AEF5iy1B/0ApFKAy8PxdIE1Vo9ma+hgJsofMS8Ao7tTXCoQlcEoj4ANtSRqaWKPPe3cv 18T3LNK9r2a1Bml0hAWp8KR4FsrI0G/cvQUXqSDYeAqT2h9kyyWhnp/03EZBvAfggXqX JeNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=kCUnFX3Dmww8TqumBHVYTPiCRsSIx0N80ZVHBE64RO8=; b=b72pDRdFIF4gY7Tnjt9HkdLzv5b9zDXTr65dqKU2PNDpQzLUuIym/b1HMlzqekpX2e PYEw1MWHIS/MXhSH/t7/im2kn+7jrkZSAW8knbfU7Oacc4x4OlF/71P5xmu4PI4whAb/ 6An4Ne+mG2MwkyWqNveXnBCca2U+sTlBenweEpihwVejY0igcnqM/K86pj4E9T4LNo+M w3Ajy7eC3J7kYeIblhtRpPzh/ejLw8O79qhwsntaft2SeFtDyVuRD4jXyYYH2NUWp27i CNxaXxsdLR8vmoJ+DQJ0uG9kYlGVSMS5kFxZqeKaT/b+UgYNA6M5++niHDDjA/6hyZz+ ggPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=baORlmcR; 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 q11-20020a65494b000000b003816043f04bsi5721586pgs.576.2022.04.21.10.12.35; Thu, 21 Apr 2022 10:12:56 -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=baORlmcR; 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 S1383368AbiDUAOR (ORCPT + 99 others); Wed, 20 Apr 2022 20:14:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348283AbiDUAOO (ORCPT ); Wed, 20 Apr 2022 20:14:14 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 54AB2192A6; Wed, 20 Apr 2022 17:11:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1650499887; x=1682035887; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=DO8u08CYrrpFU9VtVrhYb0LJ+ph2/wh1S84s2b8igPE=; b=baORlmcRtjFPhbjxeMGeyz4YkHKHJay5aSji5jRILfyHEPjKWWKYhHOb KQu96wFN6xFEa3/izkSzRPokXzKaz9GKYbgiC6W94v04h/UvJoXXpgnuk USjQiKC9inbmj4ljziDtxmAoLaSoLoqONcT2VeNDvHdqQRsmvu7pLn+aL LBHLdHmKYr+gePEUNH41KKNHRQ8DohYh0Py5H5fS15jgK+n8knzHlGvoo XO6jIPXPMt4KNkebywUKbITMEmYCV15HmzBzb8QJqdhxJKVqd23TF1aBl JuB0J+6QRbey24sD8v0V4wOKiOibXeV+/2Umxgsj5xmetF8qyZdUjbKuU g==; X-IronPort-AV: E=McAfee;i="6400,9594,10323"; a="350634791" X-IronPort-AV: E=Sophos;i="5.90,277,1643702400"; d="scan'208";a="350634791" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2022 17:11:27 -0700 X-IronPort-AV: E=Sophos;i="5.90,277,1643702400"; d="scan'208";a="555463463" Received: from ssharm9-mobl.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.254.30.148]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Apr 2022 17:11:23 -0700 Message-ID: <420a4d689f73f9f7dc1ef71c61da75b7c9777a3f.camel@intel.com> Subject: Re: [PATCH v3 4/4] platform/x86: intel_tdx_attest: Add TDX Guest attestation interface driver From: Kai Huang To: Sathyanarayanan Kuppuswamy , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Hans de Goede , Mark Gross Cc: "H . Peter Anvin" , "Kirill A . Shutemov" , Tony Luck , Andi Kleen , linux-kernel@vger.kernel.org, platform-driver-x86@vger.kernel.org, isaku.yamahata@gmail.com Date: Thu, 21 Apr 2022 12:11:21 +1200 In-Reply-To: References: <20220415220109.282834-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20220415220109.282834-5-sathyanarayanan.kuppuswamy@linux.intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 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_AU,DKIM_VALID_EF,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 Wed, 2022-04-20 at 16:45 -0700, Sathyanarayanan Kuppuswamy wrote: > If we want to support multiple GetQuote requests in parallel, then we > need some way to uniquely identify the GetQuote requests. So that when > we get completion notification, we can understand which request is > completed. This part is not mentioned/discussed in ABI spec. So we want > to serialize the requests for now. > Yes it's unfortunate that this part (whether concurrent GetQuote requests are supported by TDX architecture) is not explicitly mentioned in GHCI spec. I am fine with only supporting GetQuote requests one by one. AFAICT there's no request to support concurrent GetQuote requests anyway. What concerns me is exactly how explain this. As I said, we have GET_QUOTE_IN_FLIGHT flag now. Theoretically, you can queue multiple GetQuote requests, and when you receive the interrupt, you check which buffer has GET_QUOTE_IN_FLIGHT cleared. That buffer is the one with Quote ready. However I am not 100% sure whether above will always work. Interrupt can get lost when there are multiple Quotes ready in multiple buffer in very short time period, etc? Perhaps Isaku can provide more input here. Anyway, how about explaining in this way: "The GHCI spec doesn't clearly say whether TDX can support or how to support multiple GetQuote requests in parallel. Attestation request is not supposed to be frequent and should not be in performance critical path. Only support GetQuote requests in serialized way for now." -- Thanks, -Kai