Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1623875rdb; Wed, 20 Sep 2023 14:52:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEg20PBNNJmARaFGzKNGtrBgtE98b4mxHqP68miq9+2QiHcebTN4SXzXaNlndbeQgQMZwPY X-Received: by 2002:a05:6a00:997:b0:68a:49bc:e0af with SMTP id u23-20020a056a00099700b0068a49bce0afmr4767062pfg.1.1695246720962; Wed, 20 Sep 2023 14:52:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695246720; cv=none; d=google.com; s=arc-20160816; b=cv5o0lk+flPx2+sSWHNECn6jawaThmvQpttqHlWqfNgS35Q2hBgz/OGhVNcM/z1AjJ 76+Nd9aqntWWjGfZWr+1/JudNncnPJ5FfRHU7DUvY2TdyFHfZIdccFQLigaKFsJVJJG1 c5rtaKYj67CdELR3rV2DrDwyLPtcqrQfCcX1/dB+JvUyjsex+Hf2BZR/yWvY2QmlIUNY v7B+6aFy14QOOehefE48TDoKMWrUcs40wJF+5EKNwRXK7dJw9WDIskU7/+FCj5ddRopC 7pm5D+ESCfPHuCr0kTg8+RmvaQykPHvMYcrKr27gQ3DCnRO1tjq/xZdmQ0Q8BEo5qGcX ORIg== 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=i4DDLJ461G0s5+f2+PfJARkZ17KujXdTz92hcQ3wA4E=; fh=lp9H+VgtxzIxLfeyk38S4VrqS5ruGCAXlwR+xhdke2I=; b=wxdJfwtjyFwfRAMfoJ07gAOEhX8mCJN7XdWDz/jO5c1LQsYb9G2gJC0BHj/baq0dHe dD5DGa9YutLiQN1C1XHCJVhDyuOPknFDzzVd+v73BSgbnGTfTqU3VALGi7l36GgMLEak BpD1TVXLD0rYmRJE4yXleWC3Zn4WhHmQARd79qfp7cmeXYqhnoKjhA7ET15EpFTQO6Vu ujBqqrdSZz8EGQw1KrIM1W8q0OLsq3FAiVOP1xyJQb1GJMKMab/x88piA4D4QBcP8sZm VWCdGyaWoj2z6wbCEkya8zOchXW4QJLkhLVAgKhcTBmoPuDvsJJXUGsiWLf7bThvn9jI SLgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RtsUjfZu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTP id cu4-20020a056a00448400b0068a6f6d9f85si54876pfb.140.2023.09.20.14.52.00; Wed, 20 Sep 2023 14:52:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RtsUjfZu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id BB2B8802C692; Wed, 20 Sep 2023 11:12:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229706AbjITSLt (ORCPT + 99 others); Wed, 20 Sep 2023 14:11:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229709AbjITSLr (ORCPT ); Wed, 20 Sep 2023 14:11:47 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10F72D9 for ; Wed, 20 Sep 2023 11:11:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1695233500; x=1726769500; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=UfXDF7vmJ3p4o1hrc4blpL6pXeqqgur0nc4CHtDJYss=; b=RtsUjfZuFESeiFKtlXRkcE1ydZcjHh3YmXahpKkfshJfhrNGZEqUJF/W UmIWiJJDxh/FnSKn+LYwIDKHNkXQEXGIMiir4j8p3x8N/dbPPPIBzFYq0 h/Wql9uXXgXSqVfczcpazjRtCVTcg01sMM9RnFZIQRqt9SEMJrRQi74MB pyLPV46KA5eWGSnDLf7fJE4Kb8zBNWIv3onCGHPZo+QywiAHc00yEF58A 7PwlfI3D6Ftb18UvIpRI3fz+3Z/twhownlYDBIMt61jYKcCHJirukx/6F VoaCRlEq2ts6X2ImuBv3w5Fu0amqJ6dk4BmAOQfmI7Sx9hf+ArqfHjxKU Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="365364359" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="365364359" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 11:11:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10839"; a="920391403" X-IronPort-AV: E=Sophos;i="6.03,162,1694761200"; d="scan'208";a="920391403" Received: from awiese-mobl.amr.corp.intel.com (HELO [10.251.18.38]) ([10.251.18.38]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2023 11:11:36 -0700 Message-ID: Date: Wed, 20 Sep 2023 11:11:36 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.1 Subject: Re: [PATCH v2] virt: tdx-guest: Add Quote generation support using TSM_REPORTS Content-Language: en-US To: Kuppuswamy Sathyanarayanan , "Kirill A . Shutemov" Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , Dan Williams , "H . Peter Anvin" , Tony Luck , Wander Lairson Costa , Erdem Aktas , Dionna Amalie Glaze , Qinkun Bao , Guorui Yu , linux-coco@lists.linux.dev, x86@kernel.org, linux-kernel@vger.kernel.org References: <20230914031349.23516-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20230920131633.ig6ldmwavpu7uhss@box.shutemov.name> <0031e031-10a8-43b1-a29c-8e1cf913eaad@linux.intel.com> <20230920175248.6foe67cwfe5oaa7u@box.shutemov.name> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 20 Sep 2023 11:12:06 -0700 (PDT) On 9/20/23 11:08, Kuppuswamy Sathyanarayanan wrote: > My thinking is to allocate it when we really need it. We only need this memory if the > GetQuote hypercall is successful. We can also allocate it at the top and there is > nothing wrong with it, but it will not be used in failure cases. Since top declarations > are not a requirement, why allocate it early? Do folks *REALLY* want this patch set to be a trailblazer where we can all nitpick the nuances of how we want to deal with this snazzy new __free() mechanism? Or, do you want it to be old and boring and do it the way we've done it forever? Your choice.