Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1371027rdb; Mon, 2 Oct 2023 07:38:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHWTa/5Umd5abiKpqTfNP+sDHd00H8LZ6uKyx0UEsyXxPXqbmI1+xpkOlZalZDXgOS+EvpM X-Received: by 2002:a05:6a20:5506:b0:160:719d:63c5 with SMTP id ko6-20020a056a20550600b00160719d63c5mr10338388pzb.59.1696257523792; Mon, 02 Oct 2023 07:38:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696257523; cv=none; d=google.com; s=arc-20160816; b=UW57ar092dcMlXQ28iQ3oRazs9Yj1EnpkCyWmx6iHdKhDs/Az4iuaAbnK1Q1B7fTC7 /Rw5ZMzhal/FnhwmLVoOIu8Pvldt56kqe/ib8dOZpjrnl580woWd2Z2PipYzpjqjkXCF Q+ylUkKPo6uhLfs1+7+ej3tGn0bv1jHUeD3nAyq8O0vL/VZ7Xe7TFI/yNKmiSc8uFp4c x9ZFrZVy1Neyx3KEGAabsVoW/u3XJGPI4DNIyKhKgTWxpm9VefVTIWHIV+5HCBzf94+2 obva+0lD6/NlOUZV9HZPDqdwsGMTyZHNbNQd/NPiZBbD6+D/JEil2TXwVaSm2fK8cV9Q hOtg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=o7gGZlZ8YC05PY6s+EEwwJKZSJrWng/rwV3MUZ7mOlg=; fh=PCd+/lLLjjR+XgSl/dYBVTW++Vu/B246hIeckUzDoAg=; b=ypMabktDGpD4OSQ6dcr8uC1SDIcu2t5QIkEetoumJ34B3UuzkQ79m/dpAQx7GsbAFj 6OQ+4yqJNs7fgXZaE7YdwbHytmd//lH8TrjCTWRcat8UBZFNzV5cgLL6SntuiB5zDkr+ LK/NF8KS7aaBSfcEy2G9xXbHIWUg33nGusQQX5gB89EVpq6o6ndYzsnlIw1d9IiHnHSt scTYWndU8Eu4qMPR+Ru00sdDxX5/ll1yfQalpXpApT3iikIz0IZThQvzifJJqUUEsO2I 6BUtl7WQgsF96SqmawF72nydvIK1zuZUPelhluAt80EQxeyDU7qTqPAuIGssTMGZZ1mA R6fg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aMJk963q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id z5-20020aa78885000000b0068e45c6ca3fsi29322710pfe.93.2023.10.02.07.38.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 07:38:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aMJk963q; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id 47CB38028574; Mon, 2 Oct 2023 03:39:05 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236519AbjJBKi7 (ORCPT + 99 others); Mon, 2 Oct 2023 06:38:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236501AbjJBKi6 (ORCPT ); Mon, 2 Oct 2023 06:38:58 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D92B9D for ; Mon, 2 Oct 2023 03:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1696243134; x=1727779134; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=FsM7FgtD91vOAiMV4yy4j0zqoSKCI8hIp0bl71iOibQ=; b=aMJk963qB4fTwBY7SI6MOmUtpB28xofcfpUBbw3NIgW7ytebCFm7NdMJ wWpnXHaC95MMg9KKLww0r37/QQ3s60O9lHH+tSwI5+sJH1640ibOWKBhB Gi45bSg62QKCEPWxbLldjL4iw/5QSDgPPXsNnym/FUUrjEJL8qUYPz26p oiabrtObqCjTK+C+41gQm6aV6rdddk71zGS9c6XD8Y1zzi4U1GAgvdcNn buy9kLVWwbQawmkMWJ69mhCxNfaOulvO4RmtrAFH+/D92FwuL9D37+IV3 2SXxQRJgYXDuUkXAXLYplX4xAkFmJKdXV7GOhXLTbjnnu9VunWDoow7M2 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10850"; a="372967576" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="372967576" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 03:38:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10850"; a="779904124" X-IronPort-AV: E=Sophos;i="6.03,194,1694761200"; d="scan'208";a="779904124" Received: from mdmitrza-mobl1.ger.corp.intel.com (HELO box.shutemov.name) ([10.252.41.158]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2023 03:38:51 -0700 Received: by box.shutemov.name (Postfix, from userid 1000) id D7DA610A093; Mon, 2 Oct 2023 13:38:48 +0300 (+03) Date: Mon, 2 Oct 2023 13:38:48 +0300 From: kirill.shutemov@linux.intel.com To: Yi Sun Cc: sathyanarayanan.kuppuswamy@linux.intel.com, linux-kernel@vger.kernel.org, heng.su@intel.com, yi.sun@linux.intel.com, Dongcheng Yan , x86@kernel.org Subject: Re: [PATCH v3] x86/tdx: Dump TDX version During the TD Bootup Message-ID: <20231002103848.4e4pscg4wz7kxgxz@box.shutemov.name> References: <20230930161110.3251107-1-yi.sun@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230930161110.3251107-1-yi.sun@intel.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 autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.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 (pete.vger.email [0.0.0.0]); Mon, 02 Oct 2023 03:39:05 -0700 (PDT) On Sun, Oct 01, 2023 at 12:11:10AM +0800, Yi Sun wrote: > It is essential for TD users to be aware of the vendor and version of > the current TDX. Additionally, they can reference the TDX version when > reporting bugs or issues. > > Furthermore, the applications or device drivers running in TD can achieve > enhanced reliability and flexibility by following the TDX Module ABI > specification, because there are significant differences between different > versions of TDX, as mentioned in the "Intel? TDX Module Incompatibilities > between v1.0 and v1.5" reference. Here are a few examples: > > MSR Name Index Reason > ---------------------------------------------- > IA32_UARCH_MISC_CTL 0x1B01 From v1.5 > IA32_ARCH_CAPABILITIES 0x010A Changed in v1.5 > IA32_TSX_CTRL 0x0122 Changed in v1.5 > > CPUID Leaf Sub-leaf Reason > --------------------------------------- > 0x7 2 From v1.5 > 0x22 0 From v1.5 > 0x23 0~3 From v1.5 > 0x80000007 0 From v1.5 > > During TD initialization, the TDX version info can be obtained by calling > TDG.SYS.RD. This will fetch the current version of TDX, including the major > and minor version numbers and vendor ID. > > The TDCALL TDG.SYS.RD originates from TDX version 1.5. If the error > TDCALL_INVALID_OPERAND occurs, it should be treated as TDX version 1.0. > > Co-developed-by: Dongcheng Yan > Signed-off-by: Dongcheng Yan > Signed-off-by: Yi Sun Looks good to me. Reviewed-by: Kirill A. Shutemov But you need to send it to x86 maintainers. I've CCed x86@, but you might need to resend it properly to maintainers. -- Kiryl Shutsemau / Kirill A. Shutemov