Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2450731rwl; Sun, 26 Mar 2023 23:43:51 -0700 (PDT) X-Google-Smtp-Source: AKy350Y5/O2jpATghfCZ+41pjXW5+dnmDhDNfgYS0Ajlzqw4+mbdR25kN/xQhE0AYRfMnLVXXI24 X-Received: by 2002:a05:6402:514d:b0:4fd:2b59:ef91 with SMTP id n13-20020a056402514d00b004fd2b59ef91mr10542200edd.3.1679899431285; Sun, 26 Mar 2023 23:43:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679899431; cv=none; d=google.com; s=arc-20160816; b=sM3h18RA1pdy5QDvknRYQZNKn9C4vqVnZgD+LzV94F+gynptLoqY7ENg7amzpt65eF l64US3inpCgX5wVBxg4wBb8NC8F9qnEbTett9W+hgTIyKVZDx0rKHqAHSVEA29ekEmR3 4wtrk9OgVqfSM+aeHHk+5QlaDeQZaMXmmqLHnzHQVMdje8ilenm5MMybC4/w+anUniRG 2pAvZksl9UqgK5BG6dbd8/KrEiiA2UYgApvyu9N9mXHC71nVgCgAlZ36o+FyoTFAfGjs psHILsoIsbAPIW2yD97Zb8PtOCy//2j6QGCKUvLnH5gMgByAQ0vSbpx6BQrMTxnYAh3K MqJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=ju/d3q0v2bf5FDc4EUiRscamg6Isw0kzmX3UyI6cgCA=; b=awaoIdZZBt1a5dr9hAPB1ePQysoy6XYlU6vouO7CQ9mh4BivKK0n/be+RQ8+MaCDJi FTYz3Yg7fFdCimmIqQBEaOdmdpwx+lbFqihJpibkirq3rez4O+nDO9WedfCzQKzdtvd5 yoDl34slYE36Zv87s8Ik3mQd3uwfTg0IZL/HUthMAvah2SUG7fokNWoH/J7K7NaPvhtq BGSupiqC1C8/5Ksl70kyTi/73Ab+Ong08chC6XsVXFUcZD82XvrRH1QwxKhLDvugZ0si Rg3wYs1/z3wV7dNCc8iNoiPEiMXwovpt24gYDa8BLxdVzKfjzPzuCOF14JwNW+9EGK+b gOkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="ZYv3p4//"; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n10-20020a05640206ca00b005021f0d5761si8065738edy.680.2023.03.26.23.43.22; Sun, 26 Mar 2023 23:43:51 -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=@linuxfoundation.org header.s=korg header.b="ZYv3p4//"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231980AbjC0Gae (ORCPT + 99 others); Mon, 27 Mar 2023 02:30:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232259AbjC0Gac (ORCPT ); Mon, 27 Mar 2023 02:30:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 43F0D3A9A; Sun, 26 Mar 2023 23:30:28 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B50CB60FC6; Mon, 27 Mar 2023 06:30:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 607DEC433EF; Mon, 27 Mar 2023 06:30:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1679898626; bh=ju/d3q0v2bf5FDc4EUiRscamg6Isw0kzmX3UyI6cgCA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZYv3p4//3I4ZFnwKiWQ8XJHI7UWl6RiSftpivRsW+GLQ7F2V5s4Ez43RwaO7oRc26 uy+SwxyfKE9r3MNjY7t/6uaTxU9DIfXAUpMqXTlcEHOZEQbvULPcwGA4UVtr3L0GVV AP1JnveRLuIfkOxa6DnQ83R0cIG/DOS+nV90ukKE= Date: Mon, 27 Mar 2023 08:30:24 +0200 From: Greg KH To: Sathyanarayanan Kuppuswamy Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, Shuah Khan , Jonathan Corbet , "H . Peter Anvin" , "Kirill A . Shutemov" , Tony Luck , Wander Lairson Costa , Erdem Aktas , Guorui Yu , Du Fan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v1 2/3] virt: tdx-guest: Add Quote generation support Message-ID: References: <20230326062039.341479-1-sathyanarayanan.kuppuswamy@linux.intel.com> <20230326062039.341479-3-sathyanarayanan.kuppuswamy@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable 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 Sun, Mar 26, 2023 at 12:06:26PM -0700, Sathyanarayanan Kuppuswamy wrote: > If usage of DMA APIs / platform device is not acceptable for this use case, It is not ok to use a platform device for this because you just do not have a platform device for it, don't make one up out of thin air please, as that really doesn't even have the correct bindings to the DMA memory that you want here. > an alternative approach is to allocate a fixed number of shared buffers during > the TDX guest driver probe and use it for GetQuote requests. Although it would > limit the amount of memory we can use for GetQuote requests at a time and also > reserve a chunk of memory during the init() time, I think it is an acceptable > tradeoff when compared to alternative choices. The AMD SEV guest driver also > adopts the similar approach. Please let me know if this approach is acceptable. This sounds like a better approach. thanks, greg k-h