From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 42C89C04FCE for ; Wed, 20 Sep 2023 18:11:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbjITSLu (ORCPT ); Wed, 20 Sep 2023 14:11:50 -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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.