Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp709178rwd; Thu, 8 Jun 2023 06:49:54 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7dpDT4DC4C5GNDM3PcLEcs7YqOJvamffiwXzYkO0LjlfjZjHzr25DoFVN5P9RzuK9aoeG5 X-Received: by 2002:a17:902:d487:b0:1b0:113e:1047 with SMTP id c7-20020a170902d48700b001b0113e1047mr5019015plg.62.1686232193970; Thu, 08 Jun 2023 06:49:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686232193; cv=none; d=google.com; s=arc-20160816; b=nW9aMtp/HfIU3PoVC/mcf38vF7UMb2EMPntkEgpZLxPlf0JJygcld442lQV2twVJiO uOgnJPxtWn3kbFiUYQdxlMt2EdGGi10DQ3owuz8qeEFL12Me/32gMLjyzPRnlePGNklb 39wBloCR0ft952BRdgDAMzmcjPdQQhAaIfIG9T4l0Hk1LqHOmn0yRfH3+Q7B3itH6JEF wng8tafYBUkQU9LCKY+uhVW2O017OHArU75JZ5hZl7cfxr1Y54G8fYS0TDg53KhaaLtC +bqsHactp8JGjDYOfdocipVBzSAWN5nMe0RsSP+8VRZvIP9+90lwV7s4jR76EfbsZ0qp axIQ== 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=3LhjM3+2bi735QDCGqAw8Djiy9WDqijeEBCHtfGTOeQ=; b=CI099BRx6QiQVzyEJep5NqogtShCjqfDSTEB6858CQcsIbYHzGd6NfP0+53jN/wQVJ 2bTrKI1F/3rdEbHAUZk7tEBiCq71oQbyDPzqo0DofRpwSkeHYa/vSVz8JxpeY74AICS6 f8dD0C5fNB9adQPS1yQE/oIAMoteDFix8W8bS1ntZiOYp0lB/0AeR5t/9xzoHTlXZtiM SgqlrGaZ/4zDXUU3iaHZfr4yf77QmASlw/sC3yK+/fafLgzgGG54N2y5VOalN/THXnYt t4Tqq/SB/4mRMlaygFem3ngXiiWQvhwStwD/P+EYsH+SrIVix/nWlKiCvJCITii64CQQ O+lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CenOV2gn; 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 i4-20020a170902c94400b0019e57f5a5aesi1091465pla.567.2023.06.08.06.49.39; Thu, 08 Jun 2023 06:49:53 -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=CenOV2gn; 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 S236671AbjFHNPm (ORCPT + 99 others); Thu, 8 Jun 2023 09:15:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47136 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236628AbjFHNPj (ORCPT ); Thu, 8 Jun 2023 09:15:39 -0400 Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C10AB26B3; Thu, 8 Jun 2023 06:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686230134; x=1717766134; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=RHNSvXgy1i6qqzbOx4uNw2Wdc/hsK8aF/91zZPsKL3A=; b=CenOV2gncCGv4rOBhIfadWlucSXeeMoZkbQ7vvm/aF3lbHNIBsSuhaKc Y9tUXuKosveKmwzoqEG4Z0ozkPonyvfhJE3FBhnd/YMveBVcEO48P/FOG oGt/Kp03a/qNBRTMQCIt0iygKSynSBfDLh1BAR479D/HVsDFq11CKbp+5 DKUocFfP6uKi14fVtDkX2nNbcSD3G+SZMEmwa/wTYholeoRBvK98QsqtY yPkdjXOmigWu/A0I4SlDMoubIoHd9BIHsiGm3rAyHwQNt3/v5+oI5pHwp Td8ICKLok2Tsmo8CYyTk5r8VdO5il10jWWfZNdOpyu83RICY/4F291ECC w==; X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="337660974" X-IronPort-AV: E=Sophos;i="6.00,226,1681196400"; d="scan'208";a="337660974" 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:13:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10734"; a="854337488" X-IronPort-AV: E=Sophos;i="6.00,226,1681196400"; d="scan'208";a="854337488" 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:13:10 -0700 Message-ID: Date: Thu, 8 Jun 2023 06:13:10 -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 08/20] x86/virt/tdx: Get information about TDX module and TDX-capable memory Content-Language: en-US To: "kirill.shutemov@linux.intel.com" , "Huang, Kai" Cc: "kvm@vger.kernel.org" , "david@redhat.com" , "bagasdotme@gmail.com" , "ak@linux.intel.com" , "Wysocki, Rafael J" , "linux-kernel@vger.kernel.org" , "Chatre, Reinette" , "Christopherson,, Sean" , "pbonzini@redhat.com" , "tglx@linutronix.de" , "linux-mm@kvack.org" , "Yamahata, Isaku" , "Luck, Tony" , "peterz@infradead.org" , "Shahar, Sagi" , "imammedo@redhat.com" , "Gao, Chao" , "Brown, Len" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "Huang, Ying" , "Williams, Dan J" References: <50386eddbb8046b0b222d385e56e8115ed566526.1685887183.git.kai.huang@intel.com> <20230608002725.xc25dantcwdxsuil@box.shutemov.name> <19ea7470e9d6fa698f9ad7caff3279873e530a0b.camel@intel.com> <20230608114128.vu75wlcojpyjak22@box.shutemov.name> From: Dave Hansen In-Reply-To: <20230608114128.vu75wlcojpyjak22@box.shutemov.name> 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 04:41, kirill.shutemov@linux.intel.com wrote: > These structures take 1.5K of memory and the memory will be allocated for > all machines that boots the kernel with TDX enabled, regardless if the > machine has TDX or not. It seems very wasteful to me. Actually, those variables are in .bss. They're allocated forever for anyone that runs a kernel that has TDX support.