Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1554290rdd; Thu, 11 Jan 2024 02:43:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IH53T/y7W69+foZUaBfgwNWWiQfyY0VVgUgjCGbEMVs8fCKOzo7OplMhHuVbQ+7gkvNaZWe X-Received: by 2002:a05:6402:2d2:b0:558:7d8:9453 with SMTP id b18-20020a05640202d200b0055807d89453mr240536edx.120.1704969835956; Thu, 11 Jan 2024 02:43:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704969835; cv=none; d=google.com; s=arc-20160816; b=F1rm/ppO1QJueFuIX+eliAuvLvM4XvP7Gkf8FI/zIAxQD4mmH9iHjM8ot8FlaUVcla hqL4ifoOMRAsgTJ0t6OXNbcXtxZbCmkD7mRBDPDAW59Ni12efbm8Le1x0fYClPpclZm/ r8EFszj11D8yPPjNQu1eRuq7BO6TrlvhJEfDdXJlEqd+DhRVTdHq4Axtt3Og0w7H1IBk wWOhwyzmDYFNT29ni2JF+zAWoMlLLu312QOzIcc6WAUqoPguCuWov6MCn8zwrSl+KK3P M1faeCkfXhRjvfRHqbhHMDSJ4Eu/ECLN/NYj9RSny5h0UUQvbvM1KC2QfoaAEe5p6lU/ P0hA== ARC-Message-Signature: i=1; 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=9qK192ocgKMsIr1wSMFt73snWZNov2ly9T7WSIOIMEQ=; fh=LHo6bQhr1FMsacmPIEDQcJ7IuXBEjZpwzW5IFaCV/js=; b=JlN3Yum5ZlmfbW/0yS6e79DuULeTzb8C68mw4adBYwBHzKVsc6l/6Pm8HIbC/mxODe yz8jOl6ExadCreVNXgbxNMaWKMo6q9iG0kiVSQsOQB83JdWLbLzzU2srrQepmUS2frsR YTb8QEqAggHYDvJFJXnC9B6ClNJ16hf1BUBqGkH3mDUX3m9kIrWEZk1ECiUiOzvC4K5X fV8uPLdo7w0t8ZFg97pOh/NyhBA7Uar4Gk5oM3hfFSuKQ8xKjmikev/aRGxQ+XPEJ1US VzcvaDSWtQ5PjlRYUUMXx1iVoCtUbK6TZgA8V++aLPWtDlRFokxAZoxX60rX/fmoA7Dx hjrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Kn1wlYvU; spf=pass (google.com: domain of linux-kernel+bounces-23399-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23399-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id g5-20020a50d5c5000000b00554228f1467si404914edj.414.2024.01.11.02.43.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 02:43:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23399-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Kn1wlYvU; spf=pass (google.com: domain of linux-kernel+bounces-23399-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23399-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 am.mirrors.kernel.org (Postfix) with ESMTPS id AE2081F23C65 for ; Thu, 11 Jan 2024 10:43:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E8B914F61; Thu, 11 Jan 2024 10:43:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Kn1wlYvU" Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.93]) (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 BC16A14A92 for ; Thu, 11 Jan 2024 10:42:59 +0000 (UTC) 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=1704969779; x=1736505779; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=oeO4P4G8+DW7P/TORAOolFsZ/4zgVraJv9jIndq8zmM=; b=Kn1wlYvUf3+Lgqp6THBJh5OznX9My7kKLET+AxHx5MpkP9GU6inI4ahF P/c+NgVGtytrHNdlaP9xGVAaaPhL+UhUmBGeVlJ9NeG3usjEcARc2i/sV 3nIpHQwy0XfuGrWkp/k86REDskG0SJz7D299FubUGfpTkGWBLmLk8eVhb FIj4BXtsPMAPqMnzhM1ciO8dda4tIvvYVyyfWrmTd9v39Z5MaavwsLJPh Qp2szIJqCY0uwNnF0FMlkjO18iVpwp1SAFHhvP6llNP+mtGpxUj0+TMTU iK6eXioq0fly9wy8mYxyVODQx2WEIGVCeD14DJNgKGOqKMzB+Z4BuC4z1 g==; X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="395954017" X-IronPort-AV: E=Sophos;i="6.04,185,1695711600"; d="scan'208";a="395954017" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2024 02:42:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10949"; a="782582390" X-IronPort-AV: E=Sophos;i="6.04,185,1695711600"; d="scan'208";a="782582390" Received: from tvonhert-mobl1.ger.corp.intel.com (HELO box.shutemov.name) ([10.251.213.56]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2024 02:42:56 -0800 Received: by box.shutemov.name (Postfix, from userid 1000) id 57E4C10A557; Thu, 11 Jan 2024 13:42:53 +0300 (+03) Date: Thu, 11 Jan 2024 13:42:53 +0300 From: "Kirill A. Shutemov" To: Tom Lendacky Cc: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , linux-kernel@vger.kernel.org, Dexuan Cui , Jeremi Piotrowski Subject: Re: [PATCH] x86/mm: Fix memory encryption features advertisement Message-ID: <20240111104253.fzfjl6z4j3nup6cj@box.shutemov.name> References: <20240110193514.15620-1-kirill.shutemov@linux.intel.com> <8d443374-1b3b-4099-a306-5f9e0fac7851@amd.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: <8d443374-1b3b-4099-a306-5f9e0fac7851@amd.com> On Wed, Jan 10, 2024 at 03:33:13PM -0600, Tom Lendacky wrote: > On 1/10/24 13:35, Kirill A. Shutemov wrote: > > When memory encryption is enabled, the kernel prints the encryption > > flavor that the system supports. > > > > The check assumes that everything is AMD SME/SEV if it has the TDX CPU > > s/if it has/if it doesn't have/ Oopsie. > > feature set. > > > > To avoid confusion, check the cc_vendor directly. > > Is this because of the setting of cc_vendor in hv_vtom_init() without > setting the TDX feature and so "Intel TDX" isn't printed and instead "AMD" > is printed? > > If so, the commit message should really have some info about how this > relates to Hyper-V isolation VMs. That's one of the issue. But the code is generally has flawed logic that worth addressing. Will send v2 with better commit message. -- Kiryl Shutsemau / Kirill A. Shutemov