Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp698876rwd; Thu, 8 Jun 2023 06:41:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ69dmHvlv5xoYyoifpBRPlVuJyNDWr6jPFIS40uPWCNgdthc25IGWfIHzBHRf7ZWKl85Ep0 X-Received: by 2002:a05:6a20:7484:b0:104:8045:c952 with SMTP id p4-20020a056a20748400b001048045c952mr2411029pzd.23.1686231659892; Thu, 08 Jun 2023 06:40:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686231659; cv=none; d=google.com; s=arc-20160816; b=V61boxfaYq9Peicmbgmsmw8ZcLRQt/RezuPQRjE4EiHVUtouweGeFbNfu2rqT4Tztw mWOhxNxArLWsdogX1AialFju+CoVFus5bKwlL/f74cVsGpbhKP771TSH4psjvM6uy9cg gTobas2HerJO6dT5rTqEEPxSRIvtf4IBisegYUDOE0+fnrRBxqIyuH+0VGMwpXepleK9 lm7ABtmzldy3vAnK1UO2nk0EMPCXjlpK9768AlUtSjV6/O+IQvjAiK4GKlLfUZDs9d6/ DNUeWVPxL0HvH1iBO7USYS4NeGhdm+8WZ6IU5O3xvoe4PJN6DupV8Ul1yDk3AHkUvuwJ WHDA== 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=X1Tim7U/CKApAgIPkim6R/86N8bDxWng+p7j6BKc4BQ=; b=AXwsACL4CMW2LUFtMLg0HWfLIqJfLH5J1e81Uxyt/jIHLfb209dP5LdvvSKDGPchEj m7LmhMZ11qhoCiHi4/hEE9x/cufss7wZQEfvrzhzgUj1ewQgUarf/UpJjiPGQ8BK32qw CJfwFnL6qOP3r59L4hPzrW4cPaccQqMQq4SsAD/tOtwvoZCy14QtCyrwRnpqbg94UOIM +RxEBfFGzpgYsq6y26D/D28ChoCcxJ5vN+4i7lzGoIVFsL7F1WZIJHTRcT6hky0oujFY p0JCaqOUci96Mf6g92USpbwQEhRxNACDZesrgnqMFBED50jNt0zwx0Pqlbddsc4GgX+N ZODg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Nh5OdVb9; 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 z1-20020a63c041000000b005303a26dbf8si973338pgi.408.2023.06.08.06.40.47; Thu, 08 Jun 2023 06:40:59 -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=Nh5OdVb9; 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 S236659AbjFHNPJ (ORCPT + 99 others); Thu, 8 Jun 2023 09:15:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236592AbjFHNPH (ORCPT ); Thu, 8 Jun 2023 09:15:07 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F3FE210C; Thu, 8 Jun 2023 06:15:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686230106; x=1717766106; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=a3E93K6hoxZKC9yt31Lu/vhy/OxQU5XWodnX5xa9HOg=; b=Nh5OdVb99IHtx0O9zRXmcmqclkfSIEIzvcf6c9ghy4Ac6v6zKwrEzvvC 2++PlcF+L3Ssgn+N083wsfOCYRQSra2/3LBeZ3TMdSDVD9Ila7q08fmby 33VvV7qgwo2TkIjII1BLyJBo0QGaUPVY3YatGSZdLZH0Tx76gcq3mPXAl m3JnbWEChiHbFgvYa1GjLfdxvBpPc/6HmgF2JWXzPQIwSAMCy+RyB7DgQ mdbTD3IXRxJRNYk9WyXz8dC67aQ1oN+Dwpbiu7lHCn31L8XbOdccJMndr uG/ylrMbq7iVMyj0PskDriBK0m/9JT9kT5LQ3QWetNBL1JBbHgbGtxFi1 w==; X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="337660734" X-IronPort-AV: E=Sophos;i="6.00,226,1681196400"; d="scan'208";a="337660734" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2023 06:11:20 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="854335641" X-IronPort-AV: E=Sophos;i="6.00,226,1681196400"; d="scan'208";a="854335641" Received: from swalker-mobl1.amr.corp.intel.com (HELO [10.209.22.184]) ([10.209.22.184]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Jun 2023 06:11:18 -0700 Message-ID: <201af662-f700-9145-c113-563e378074ad@intel.com> Date: Thu, 8 Jun 2023 06:11:17 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v11 11/20] x86/virt/tdx: Fill out TDMRs to cover all TDX memory regions Content-Language: en-US To: "Huang, Kai" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: "Luck, Tony" , "david@redhat.com" , "bagasdotme@gmail.com" , "ak@linux.intel.com" , "Wysocki, Rafael J" , "kirill.shutemov@linux.intel.com" , "Chatre, Reinette" , "Christopherson,, Sean" , "pbonzini@redhat.com" , "tglx@linutronix.de" , "Yamahata, Isaku" , "linux-mm@kvack.org" , "peterz@infradead.org" , "Shahar, Sagi" , "imammedo@redhat.com" , "Gao, Chao" , "Brown, Len" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "Huang, Ying" , "Williams, Dan J" References: <927ec9871721d2a50f1aba7d1cf7c3be50e4f49b.1685887183.git.kai.huang@intel.com> <0600959d-9e10-fb1f-b3a9-862a51b9d8e1@intel.com> From: Dave Hansen In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 6/8/23 03:48, Huang, Kai wrote: >> Let's also put a pr_warn() in here if we exceed, say 1/2 or maybe 3/4 of >> the 64. We'll hopefully start to get reports somewhat in advance if >> systems get close to the limit. > May I ask why this is useful? TDX module can only be initialized once, so if > not considering module runtime update case, the kernel can only get two results > for once: > > 1) Succeed to initialize: consumed TDMRs doesn't exceed maximum TDMRs > 2) Fail to initialize: consumed TDMRs exceeds maximum TDMRs > > What's the value of pr_warn() user when consumed TDMRs exceeds some threshold? Today, we're saying, "64 TMDRs out to be enough for anybody!" I'd actually kinda like to know if anybody starts building platforms that get anywhere near using 64. That way, we won't get a bug report that TDX is broken and we'll have a fire drill. We'll get a bug report that TDX is complaining and we'll have some time to go fix it without anyone actually being broken. Maybe not even a pr_warn(), but something that's a bit ominous and has a chance of getting users to act.