Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp373545pxb; Thu, 17 Feb 2022 06:06:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJyz2Ycm9w1di5lQcWlIebdwaeD6lhdwyYZNkmr/bTLaHpBzFIXsmMm4lu30815XGTY15cTF X-Received: by 2002:a17:902:cacb:b0:14d:81e7:c698 with SMTP id y11-20020a170902cacb00b0014d81e7c698mr2977717pld.96.1645106763399; Thu, 17 Feb 2022 06:06:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645106763; cv=none; d=google.com; s=arc-20160816; b=OPtwHK0avWhYX+ph87AWgjtfrPPeCsZOC8o+DsWlCmh58YadaUH6W5hztH/bU1+GOS YBWe0C6MfZ2tn3XV7nAmaBJI20JmwkdMl9r5uIavnT/pX5XaAV21zQaGl3j0v0X1gb9r a41tz8fpXEp3OdXUt70M3xFKPaWavRPiGPBHnVzfRdZDueKuYlbmRc5YJs1xzsFoJDaS d7oBQX7CQeh/dTqX92yAmA9h1qkTZ3DuV+hSc9jl1N9abm4N7t28hJ+yyC6rPXhC9RVT RetOWmpEtbQYYlbE8gPolxqFsK3TokeQDBmpARNJFt/PAnHpT+gMuJKmIDVEzw1Oxftj SZZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=CCL2r0xSrJSgqYSOwVSuo9Fz6hCmmWZfn0HqPPdbUPw=; b=LxJ28Ijw03Y1MpdBDsEipROx15tF/fVub/BM6Vy/2ZnvCx6Ys29mS4NU2Nm/ETV2cF IpEPreL721srHByp88Fc3P5UxouOv8VQ6yePUFOm4tUKGb86QIERMtaC51wr5L+R8tj6 cx3clGWu+P3rSicEYNAimTSjxyJoNQx8rBATy+NakH1uAg0nGS6pLFvMFEVhzBoUA48u MFRXMxGIpOS5PB1G/dXZn724RIqHfQ4pNEJdcAAohUydJ4E/0iy0qArxOy/51Kex6UcU a6UqnE7EJ/rUjogMYu9L4Wh2KJTqCOJZfHvto8Gx401q5otNg25boI7mnhY64vI7lu8k ZnHg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10si9958685pgt.424.2022.02.17.06.05.46; Thu, 17 Feb 2022 06:06:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240492AbiBQMiL (ORCPT + 99 others); Thu, 17 Feb 2022 07:38:11 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:45054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231514AbiBQMiK (ORCPT ); Thu, 17 Feb 2022 07:38:10 -0500 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E7041763E4 for ; Thu, 17 Feb 2022 04:37:55 -0800 (PST) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 560071C0B7F; Thu, 17 Feb 2022 13:37:54 +0100 (CET) Date: Thu, 17 Feb 2022 13:37:53 +0100 From: Pavel Machek To: "greg@kroah.com" Cc: Dmitrii Okunev , "qiaowei.ren@intel.com" , "matthew.garrett@nebula.com" , "xiaoyan.zhang@intel.com" , "linux-kernel@vger.kernel.org" , "platform-driver-x86@vger.kernel.org" , "gang.wei@intel.com" , Jonathan McDowell Subject: Re: [discuss] Improve and merge a driver proposed in 2013: sysfs interfaces to access TXT config space Message-ID: <20220217123753.GA21849@duo.ucw.cz> References: <1368465884-14779-1-git-send-email-qiaowei.ren@intel.com> <1368465884-14779-3-git-send-email-qiaowei.ren@intel.com> <20130516160311.GA12299@amd.pavel.ucw.cz> <4febd50da7e5007a2797e0f4c969fa5edd0bf725.camel@fb.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="a8Wt8u1KmwUX3Y2C" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 --a8Wt8u1KmwUX3Y2C Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu 2022-02-17 13:34:40, greg@kroah.com wrote: > On Thu, Feb 17, 2022 at 11:47:21AM +0000, Dmitrii Okunev wrote: > > Hello! > >=20 > > As far as I see the patch wasn't merged. And I see that this is the > > only unsolved thread in the discussion: > >=20 > > On Thu, 2013-05-16 at 18:03 +0200, Pavel Machek wrote: > > > On Tue 2013-05-14 01:24:43, Qiaowei Ren wrote: > > > > These interfaces are located in > > > > /sys/devices/platform/intel_txt/config, > > > > and including totally 37 files, providing access to Intel TXT > > > > configuration registers. > > >=20 > > > This looks like very wrong interface... equivalent of /dev/mem. > >=20 > > As an active user of these registers I hope it will be merged, so I > > would like to improve this patch (or rewrite it from scratch) to make > > that happen. Otherwise one have to do hackery around `/dev/mem`, which > > also creates problems with proper access control. > >=20 > > To be able to improve the patch, could somebody clarify why exactly > > this is a "very wrong interface"? > >=20 > > > > +What:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0/sys/devices/platform/intel_txt= /config/STS_raw > > > > +Date:=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0May 2013 > > > > +KernelVersion:=A03.9 > > > > +Contact:=A0=A0=A0=A0=A0=A0=A0"Qiaowei Ren" > > > > +Description:=A0=A0=A0TXT.STS is the general status register. This = read- > > > > only register > > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0is used by AC modules= and the MLE to get the status > > > > of various > > > > +=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0Intel TXT features. > > >=20 > > > This is not enough to allow people to understand what this > > > does/should > > > do, nor does it allow (for example) ARM people to implement something > > > compatible. > > >=20 > > > Is there specific reason why "better" interface is impossible? > >=20 > > I would love to reuse Intel's public documentation [1] to provide a > > proper description (with bit layout of the value). > >=20 > > [1] https://cdrdv2.intel.com/v1/dl/getContent/315168 > >=20 > > > [...], nor does it allow (for example) ARM people to > > > implement something compatible. > >=20 > > Do I understand correctly that a proper documentation of the registers > > solves the problem? > >=20 > > > Is there specific reason why "better" interface is impossible? > >=20 > > What are specific problems with the current interface? >=20 > What do you mean by "current" here? You are referring to an email from > 2013, 9 years ago. >=20 > If you want to propose the change again, correctly update the patch and > submit it that way. I don't believe taking hardware registers and exposing them 1-to-1 in sysfs is the way to go. We would like same /sys interface on different hardware, and simply exposing Intel's registers in /sys will not do the job. Best regards, Pavel --=20 http://www.livejournal.com/~pavelmachek --a8Wt8u1KmwUX3Y2C Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCYg5BoQAKCRAw5/Bqldv6 8v8ZAJ9vk4nE8zle4p8F69BdZK6tEpWlMgCgkM9md972WOtlpOLWKKys15Jc9CI= =2mYc -----END PGP SIGNATURE----- --a8Wt8u1KmwUX3Y2C--