Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp368931rdh; Thu, 23 Nov 2023 06:13:41 -0800 (PST) X-Google-Smtp-Source: AGHT+IF20q10PHwtPUcLoedEvjkHwZxFX8JTsu3XuRBAWNJFyH61Sa94ObAmuHpuQ6ePLVs6H6wi X-Received: by 2002:a17:90b:4d06:b0:283:84c:3855 with SMTP id mw6-20020a17090b4d0600b00283084c3855mr5471241pjb.0.1700748821457; Thu, 23 Nov 2023 06:13:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700748821; cv=none; d=google.com; s=arc-20160816; b=s6O6Lt46hb94GPgPPnslkk55Xp2ZI+W+u3EFAqgs7t6DHP4+SEbffkRohOe6bJ4rgZ yEIyZxiCwJlEtRsUIXFtwfjsPPeY4SEhRwHFT6bWEryxhOpDZ+RBixe5tcFqclNGxCiC oV2fiEHRmOXiw7L/XX2WC2FElxzM3LdhrRkFj6ia+/Ch7TYVVuFJcKMHPrTCrQyVjHZL 4NCmSSXZXKEsPVGshyf54OuLvN7rDCdepDStwdJdNtVGFSxQuWU3LxEg2uQsMm0UN43e ESXmObK8KGkVasgv0CNlZY7PCKerZZ2k2o9WUdAFcRPSUGkjRyIm5dxeXksnGAPbeCOW 8hlA== 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=m/0E/drA1G0KXMPtsrtH6SKGGquKtqtS9xXBfUmvUFM=; fh=1Ie+ok9DLok8LLm5qlbSZiXR/51z9U8R9sgEH7smzlc=; b=hQwV4M2P9wofSXi+al3TN9Etc7Xw2YSQzPVsfftBuTIs9ro8l01aprStqHkpALRM38 A/bpRV7sCcovzKSVBrM0/kzZcv2R9t/Jw0eUs3RAeKfuBuAFctOaMbuYjYRAjojlMY7i X34sWbUADSCToefmnMF1se1GFs4n6hrxyY1nH0m2+G2fe8iec9wR/cGbhsNIKoOmuNA+ faqJiigma/40W0tpUrp5P8bT8OT+OT2q6FM37xhjYVdgg2LNqYyLpvPpdPCqqgunKczc QuL1Gn59ORsgZfb4UGyWVq391C0W0v3uJe9rvwyt22yqY1hZWYekBB+5pX49fIoSNKH7 te3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bFDa7rYY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id f20-20020a17090ace1400b0026b365096e5si1885404pju.53.2023.11.23.06.13.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 06:13:41 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=bFDa7rYY; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id F2C3F807C56B; Thu, 23 Nov 2023 06:13:38 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345662AbjKWONV (ORCPT + 99 others); Thu, 23 Nov 2023 09:13:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345534AbjKWONT (ORCPT ); Thu, 23 Nov 2023 09:13:19 -0500 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AD28DD; Thu, 23 Nov 2023 06:13:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700748806; x=1732284806; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=i6dlBQVLbMkbONcy1iFh3NN9IB9skLHq2GtmTkDvwpI=; b=bFDa7rYYQhVaP7n0o2u9TqxFUZ0FsNkNCfXJb8/wcNHdNSur0lykkiIG XTU7mQ8ojwuwuvxy8boWs2FvDrPy8yLz8VQsCXVQIm+wTUGR911Hf+abT SDCTNJvy5DQq8ewy+hoOsqCKHCqaopWzNX3anqi4pAU0uzvskM3xFlIZe D9SKFwpBVvuvzIo8qqXMvDfLHVOQel4yKObI7kNr3QWr3ecJYiUmynfFf 0Z52+gDMEmAjRczN9qAxwK5fbXCEFqcpqiMR6/UlRdw1/H2aDWNtUmcXH oH1mFMTrUc4OZXzUtjgynliH7S954yvoh2KxvwhIBZ6V3fDchXDBPo0fR Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="13826094" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="13826094" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 06:13:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10902"; a="837815344" X-IronPort-AV: E=Sophos;i="6.04,221,1695711600"; d="scan'208";a="837815344" Received: from ckochhof-mobl.ger.corp.intel.com (HELO box.shutemov.name) ([10.252.58.117]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Nov 2023 06:13:20 -0800 Received: by box.shutemov.name (Postfix, from userid 1000) id 2250410A38A; Thu, 23 Nov 2023 17:13:18 +0300 (+03) Date: Thu, 23 Nov 2023 17:13:18 +0300 From: "Kirill A. Shutemov" To: Jeremi Piotrowski Cc: linux-kernel@vger.kernel.org, Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Ingo Molnar , Michael Kelley , Nikolay Borisov , Peter Zijlstra , Thomas Gleixner , Tom Lendacky , x86@kernel.org, Dexuan Cui , linux-hyperv@vger.kernel.org, stefan.bader@canonical.com, tim.gardner@canonical.com, roxana.nicolescu@canonical.com, cascardo@canonical.com, kys@microsoft.com, haiyangz@microsoft.com, wei.liu@kernel.org, sashal@kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v1 2/3] x86/coco: Disable TDX module calls when TD partitioning is active Message-ID: <20231123141318.rmskhl3scc2a6muw@box.shutemov.name> References: <20231122170106.270266-1-jpiotrowski@linux.microsoft.com> <20231122170106.270266-2-jpiotrowski@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231122170106.270266-2-jpiotrowski@linux.microsoft.com> X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 23 Nov 2023 06:13:39 -0800 (PST) On Wed, Nov 22, 2023 at 06:01:05PM +0100, Jeremi Piotrowski wrote: > Introduce CC_ATTR_TDX_MODULE_CALLS to allow code to check whether TDX module > calls are available. When TD partitioning is enabled, a L1 TD VMM handles most > TDX facilities and the kernel running as an L2 TD VM does not have access to > TDX module calls. The kernel still has access to TDVMCALL(0) which is forwarded > to the VMM for processing, which is the L1 TD VM in this case. Sounds like a problem introduced by patch 1/3 :/ -- Kiryl Shutsemau / Kirill A. Shutemov