Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4401534ioa; Wed, 27 Apr 2022 03:05:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy0No59nceKporSs1tkdKG2yFJ+7GZESAp7N4d+z206N0JrL71lKiEHjy0PtCbjCPfBAaeX X-Received: by 2002:a05:6a00:2444:b0:4fd:db81:cbdd with SMTP id d4-20020a056a00244400b004fddb81cbddmr28958452pfj.32.1651053925565; Wed, 27 Apr 2022 03:05:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651053925; cv=none; d=google.com; s=arc-20160816; b=HTlNoVQUP8VRzU+NXpAFp3OTczjuXmjJ6457iTSW39BYQnISmcasIsuYU0TTO0o6zH I9f5ahE3gXsmaxBrWzuZXN8E2PtZKp4DRQSV/8a/4KKbj5FK1t04vlCmzSexnZfTkfQr 54Lip8ALBVCaX0jb0pdkgxTs2SLIQH4p/Ge5aLKiQUXr3YkBo2uSZmJU0xM+sobevWas NaFrUD+xIgjcyd/8RCqwZPPZ2/jd5M4n0STECaypcwuQ2V3ltLOfxyNf2DyfuAkAfde6 CTyhX/M+BX/dJOs2n5kMJiYz6uLl1L7YeNqAwGytZoWtVvStAPtDTTIQllye6hZjAWVp m7Yg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=OJq1sucdwnuE+uVEspNF6io75q03srMS07Ma7j2GnBk=; b=p2tk9v29NzKCJIKGREr1ej3/AjakUn2mu33K+0OYs/JMdMw2ikxGVVU6S1ZNTWnFZM qTzGofRFlc3Uv7U26UREISR+2k2SpwjnbeV5j4i/dbT62tDPvYoVatkWiDKObRST+icO 2OLVotGjTLU0Aw1Ibb4xlgsjBjrHVd8omTdJtDCZEtPt69zItQ2uHbFJ+1crWJw7/uJv xOqqlmMIp3CQZEt8cEHePyonhXdO/FhLbtcojJcUSqRsK1Q9aRBebwVX1un+j7EmuXGN uCRCRVhb9K331tjsaZgZH5PBksy7TGA5EUmVLleC3N2542EnUpT5bIlckwC6DBUo/75M oPdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lph9hf2N; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id z123-20020a636581000000b00399460d4a76si1100452pgb.156.2022.04.27.03.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 03:05:25 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=lph9hf2N; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C0B072F4B48; Wed, 27 Apr 2022 02:30:45 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230361AbiD0AEk (ORCPT + 99 others); Tue, 26 Apr 2022 20:04:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231330AbiD0AEj (ORCPT ); Tue, 26 Apr 2022 20:04:39 -0400 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FCFE177731; Tue, 26 Apr 2022 17:01:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1651017690; x=1682553690; h=message-id:subject:from:to:cc:date:in-reply-to: references:mime-version:content-transfer-encoding; bh=yJVAQLGQpmSEwTIQy0c+wdcVPv3sKrYh2NRxvL5xBC0=; b=lph9hf2Nld+3oexIUm65IbGXk8OTlYnnQ8k05vx6lB5wQEEZvtaYdCIZ YbVYTJ6Cp/Kx2MhWbyT25BNZYE7XRpVQVVHuhzUbuXsn4QfM8QDFScnXb ocpyz5OLP6O7sH9RUZBtji255taXEz6UCt2VyAHQzm4f+Z/EKCQE3li5C hwgVnlzUi4o15LqQ75ys9RJXTYMFpBXShCX7ZS3Xb10rq04kZxcQpK6fF 4vh/ae8aSFmPS9IUbqear23i/+UJC/bzJ+Ww1g8ga3vvJ795S4sGvCLNx wwQQe8wydB796eZ8LAEDa7WrREbwi832bZO1ROpKNStmYmhIgTdUQBqDA w==; X-IronPort-AV: E=McAfee;i="6400,9594,10329"; a="265283244" X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="265283244" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2022 17:01:30 -0700 X-IronPort-AV: E=Sophos;i="5.90,292,1643702400"; d="scan'208";a="564824694" Received: from ssaride-mobl.amr.corp.intel.com (HELO khuang2-desk.gar.corp.intel.com) ([10.254.0.221]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Apr 2022 17:01:27 -0700 Message-ID: <98af78402861b1982607c5fd14b0c89403c042a6.camel@intel.com> Subject: Re: [PATCH v3 05/21] x86/virt/tdx: Detect P-SEAMLDR and TDX module From: Kai Huang To: Dave Hansen , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: seanjc@google.com, pbonzini@redhat.com, len.brown@intel.com, tony.luck@intel.com, rafael.j.wysocki@intel.com, reinette.chatre@intel.com, dan.j.williams@intel.com, peterz@infradead.org, ak@linux.intel.com, kirill.shutemov@linux.intel.com, sathyanarayanan.kuppuswamy@linux.intel.com, isaku.yamahata@intel.com Date: Wed, 27 Apr 2022 12:01:25 +1200 In-Reply-To: <104a6959-3bd4-1e75-5e3d-5dc3ef025ed0@intel.com> References: <104a6959-3bd4-1e75-5e3d-5dc3ef025ed0@intel.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 (3.42.4-1.fc35) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE autolearn=unavailable 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 Tue, 2022-04-26 at 13:56 -0700, Dave Hansen wrote: > On 4/5/22 21:49, Kai Huang wrote: > > The P-SEAMLDR (persistent SEAM loader) is the first software module that > > runs in SEAM VMX root, responsible for loading and updating the TDX > > module. Both the P-SEAMLDR and the TDX module are expected to be loaded > > before host kernel boots. > > Why bother with the P-SEAMLDR here at all? The kernel isn't loading the > TDX module in this series. Why not just call into the TDX module directly? It's not absolutely needed in this series. I choose to detect P-SEAMLDR because detecting it can also detect the TDX module, and eventually we will need to support P-SEAMLDR because the TDX module runtime update uses P-SEAMLDR's SEAMCALL to do that. Also, even for this series, detecting the P-SEAMLDR allows us to provide the P- SEAMLDR information to user at a basic level in dmesg: [..] tdx: P-SEAMLDR: version 0x0, vendor_id: 0x8086, build_date: 20211209, build_num 160, major 1, minor 0 This may be useful to users, but it's not a hard requirement for this series. -- Thanks, -Kai