Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp432403lql; Mon, 11 Mar 2024 07:07:49 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV65DnvAJaGbdMbjNmZhK2IlVSkW1PZuD/tBtCIGH7/7BwJ+iJ6K5M5aJUc6cfXy8bwjnY4ZDu0eqdKyu3vaOeNuX+2OL4STAGm4Fb2VA== X-Google-Smtp-Source: AGHT+IHtAEAvN7EKb6/q4yaCc1GYfS1AHfWj6nuWHpOgK8IR4L7KO/Wqg8N0ST0KwtThm0kzIGFh X-Received: by 2002:a05:6a00:6016:b0:6e6:98ef:f2cf with SMTP id fo22-20020a056a00601600b006e698eff2cfmr1339911pfb.17.1710166068887; Mon, 11 Mar 2024 07:07:48 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710166068; cv=pass; d=google.com; s=arc-20160816; b=gnljK7KNjm40lyCxnc3WPOd2ZnBOe4w55zpBMuRIcXwGXndninI2qD6D6GLJTsEyUU dr3N9ulDds8AfcJ/pbbCrlOLWXk3Fq/wTRr8XLnZuNkoyNCVrqlETnEzCc1LagKiHUt4 CPQTNYpwKCET22FZFUa9W/TGiShbM6iNn0q2EIhD5YXqlz9tLCM6qDsspwwOrkhi3801 bxtbi/xPCa6xcosql5Vx7gceWG8cGKcoMI/0jsxPoAMdWKZGjWARgsYp7qzeNopUxGvA kezhOBAEDUecmRLcfDjDnI6Qwgmcht0mX9WPsFiEHF77jYjoFCQgl1U8kdafFQfveO16 WFnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=nUqZzylxCnhps2W4q8UI9JFFs9ObyxDpXg7tNuK1Psg=; fh=d9TF4Z9++DmJPyw43MsFO/GJDL9binBw0nyjv24QuM0=; b=Kq9GIzFN7MPpLMrmGB/FAWbwD43BAI4iTzONNIaXZa3fpRfSCkjEVpRNdx8i25Zbq9 ZeZWojrcmWehqxN3WM7ukC52bEnU3K1GhPkkQmO2Sa5C/hWJN7foHVojD66tgxsNITjs tLZ4UC0HHjL3ACeaHxkOIiY3A83EHhPmCR8SVCkbjeAOSuRG3JeiCIZdhv43M1wVA15p mfTG/aJmYAauIbgfgjDz5zQB69g/sfZeXIQ3h8se/UW526b61ecI44Lo7t+iqz0UeaTf 1I5G6o8leHzr9XqeIXmxD97kMIne4jMV8AN+XJnS9/zjkjvNv8Yv+boesDjxITGQxhBI qdRw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Mg9M+WTn; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-98798-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id m10-20020a63f60a000000b005c279da45f1si5048936pgh.566.2024.03.11.07.07.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 07:07:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98798-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Mg9M+WTn; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-98798-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98798-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 80D47B2111C for ; Mon, 11 Mar 2024 12:06:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 130E93D0AA; Mon, 11 Mar 2024 12:05:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Mg9M+WTn" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E32193C460 for ; Mon, 11 Mar 2024 12:05:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.19 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710158745; cv=none; b=iZD5mAfSPyalyS5fNHx8ktnGYHrgUYDiId9Ora+eudXTo6NcRaVjwF/Awq13rakf6v+bknAdKkKwdO4AYaHnIiVYCcADf/vZucoAVzyhCIhZpHWbgiMgSwh/8z2fghv7VgZoOLnZhs83ddnAdRRDiYvtFp9aNtMSdVodGr5kuSs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710158745; c=relaxed/simple; bh=KImMKTG1EAP2NsDmf0Yhr0pijdhknh+XUu4hVW9JTdM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=B5Pwyss5D4IdZr82IhPk+8AG3OolCyfbvor9ss3ZMGOBBO1MJS8dMJEpoGlHgdjfoW+z/mPp/mOPIgZ8nup0h5HfrSHzhb+01CgdvFZSBgT2Dak7UCYWh1uVyGZRwBA/AkAY2tggPIvA2lRYPXHHgxyHIi7/fe0gBX5C9V7ok5o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Mg9M+WTn; arc=none smtp.client-ip=198.175.65.19 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710158744; x=1741694744; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=KImMKTG1EAP2NsDmf0Yhr0pijdhknh+XUu4hVW9JTdM=; b=Mg9M+WTnjuEbrJNqMN14jmaMfoM/IgFTvLdT56T6fJMBVKEQqKGPM2cn H3OddqxaTgeFgfBcKj/JCfyniz9KgppXN7QO/hLSZwSYi3YfvMQUHQ/pc 5feE74cNgLc3xVTJ9wUcJ3HsiEZjTIkqxqGgZu4dfd6fs+HvYjyxFI7DR nUrZs30TY59+BKUDs9CRHkJolII5SeWWt73n31v4dHOXOYau6A2uIdh/T kfi77ztOnMA5mZcckA/HeAcIZU5UGRpDN4Vjs/mCygm44Fu/nGUciHJJ0 9CoZmF+ETLJ39rU81dpS3/YRcwyplRHeBU53IBNLt4fBad525shQWp02D g==; X-IronPort-AV: E=McAfee;i="6600,9927,11009"; a="4676524" X-IronPort-AV: E=Sophos;i="6.07,116,1708416000"; d="scan'208";a="4676524" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orvoesa111.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2024 05:05:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,11009"; a="937049707" X-IronPort-AV: E=Sophos;i="6.07,116,1708416000"; d="scan'208";a="937049707" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 11 Mar 2024 05:05:40 -0700 Received: by black.fi.intel.com (Postfix, from userid 1000) id 55FB4177; Mon, 11 Mar 2024 14:05:39 +0200 (EET) Date: Mon, 11 Mar 2024 14:05:39 +0200 From: "Kirill A. Shutemov" To: Kuppuswamy Sathyanarayanan Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@intel.com, hpa@zytor.com, seanjc@google.com, ele.reshetova@intel.com, rick.p.edgecombe@intel.com, x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 4/4] x86/tdx: Enable ENUM_TOPOLOGY Message-ID: References: <20240309210230.239045-1-kirill.shutemov@linux.intel.com> <20240309210230.239045-5-kirill.shutemov@linux.intel.com> <95ba9bb3-7c48-4d99-b05e-5a45a796af3c@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <95ba9bb3-7c48-4d99-b05e-5a45a796af3c@linux.intel.com> On Sat, Mar 09, 2024 at 07:56:11PM -0800, Kuppuswamy Sathyanarayanan wrote: > > On 3/9/24 1:02 PM, Kirill A. Shutemov wrote: > > TDX 1.0 generates a #VE when accessing topology-related CPUID leafs > > (0xB and 0x1F) and the X2APIC_APICID MSR. The kernel returns all > > zeros on CPUID #VEs. In practice, this means that the kernel can only > > boot with a plain topology. Any complications will cause problems. > > Is this issue only for TDX 1.0? What about TDX > 1.0? TDX 1.0 defines the baseline for TDX. Any change in behaviour will be gated by explicit opt-in. In this case, it is ENUM_TOPOLOGY. > > The ENUM_TOPOLOGY feature allows the VMM to provide topology > > information to the guest in a safe manner. Enabling the feature > > eliminates topology-related #VEs: the TDX module virtualizes > > accesses to the CPUID leafs and the MSR. > > > > Enable ENUM_TOPOLOGY if it is available. > > I cant find the ENUM_TOPOLOGY in ABI spec (https://cdrdv2.intel.com/v1/dl/getContent/795381). > > Can you point me to the correct document? I guess JSON dump is out of sync with the PDF doc. See this: https://cdrdv2.intel.com/v1/dl/getContent/733579 -- Kiryl Shutsemau / Kirill A. Shutemov