Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp5387070pxv; Wed, 21 Jul 2021 04:22:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwphUzWBu2ACwf2wYxIx4/bH3bv6fVLGqaE5NsNubsP7GdzsdReVSzfUK4oqPEJljxAZ3Qu X-Received: by 2002:a6b:b287:: with SMTP id b129mr26209316iof.209.1626866559479; Wed, 21 Jul 2021 04:22:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626866559; cv=none; d=google.com; s=arc-20160816; b=j+E2JekxZ8DzzE2htvGiU6BLVqSJA4pDxv4gNhn99dMQ/bIoUXYYBjVI5ORjB95LcN b1iBi2C6Suco/wwLkf4CLEHO368ODrMnoRfAic7vruFLVZjZn8aL34ikdw4GJXU/gukJ opQQKC9GZn2K2MYCdbtQqWgwm3BmlMubsMuFtCWUbYmDHJPawIulEv40hK7/lA3BvML3 LnyZYCwF9/v0tG6R3Zw178vQNgEN7j3EfTZm7B04OhhTTSQA929h/uhi0THno2BUCBUx p+gbdyZuosz2OZRlRJ4KaiQf+t9ryx8w/N3BpjQMYLIHbyqaseNsCLAFrJJYLFxbDlRC moQA== 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 :dkim-signature; bh=8o2b3N0BxovUoSeF8yiLA63KOkVawL5M9eFH6F6kKR0=; b=cJy4lr3ojrFq4JwkHANULK2D4FGx80v+yd1FR6omz2dX1LB5e323RLDz3tO8XOo4q1 bBDGFvt6QgZgzto5iGJbk9e4fmPWSmABNkaMK3rYYl2RoTzjfBxMmPkBROZtZCnvffHr u/sbeKxfGqcLKG26hGA6RgsD9BMhcpEaVpSvENVn11qcBDEFTA5pH9z+05QOgSKt9BI/ oEY1rWHXyQHClh1X0ejXbeXoMd39uSanIbcc2F+q5Wh3M5eLdBJ5lY+xpiDEQ2VIeI3Y X5UT2akzAdWbwCDf/60JJ0USU8LNKJg3PEpxGgWUBhVCCCyp/LyAGAF99cfFavZ0smKK R9Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sapDQ4NP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b39si16900656jav.0.2021.07.21.04.22.27; Wed, 21 Jul 2021 04:22:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=sapDQ4NP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238128AbhGUKkb (ORCPT + 99 others); Wed, 21 Jul 2021 06:40:31 -0400 Received: from mail.kernel.org ([198.145.29.99]:41864 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238070AbhGUKga (ORCPT ); Wed, 21 Jul 2021 06:36:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 357E060FED; Wed, 21 Jul 2021 11:17:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626866221; bh=NWYaHNv3Ni0zyuqO1rUfqLULE5ZBPCsn6kFjPseILWU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sapDQ4NPrMyEC5pbgvPlwQ8XJhdyBfq7tK9RMPeUxGRfKGL2PchsjtQM+2+8nOhAx HbAeuB6L6TmBo2vTaor1cmXBJU5w4ynpa7qL+7CRSnFjrcwaAVo2eAT7YagLVpLhTO qKhF47If46jMcH6gRrYMujMOfEY7HpaZIdOcFSUOOhItj0vQRcXm5GZnWSZtnOKvMQ nVhdvDkZQMfG47qeMIBFFPCG/oQBlyzjTU7+uJNHK/DtJgJAiUgzCqgmfRuVGvlAET J0c6MJQjNo5XpNp5lSYJVru4JcGpEsdN7qeZpADyIFuxlDrDNS33V8PtAJdW/m9a6x KGD1W8YlVXadw== Date: Wed, 21 Jul 2021 12:16:56 +0100 From: Mark Brown To: Andre Przywara Cc: Benjamin Herrenschmidt , Ard Biesheuvel , Matt Mackall , Herbert Xu , Linux Crypto Mailing List , Linux ARM , Linux Kernel Mailing List , Will Deacon , Ali Saidi , Jon Nettleton Subject: Re: [PATCH v2] hwrng: Add Arm SMCCC TRNG based driver Message-ID: <20210721111656.GA4259@sirena.org.uk> References: <20210720152158.31804-1-andre.przywara@arm.com> <20210720171631.071f84f5@slackpad.fritz.box> <20210721001803.303dfba1@slackpad.fritz.box> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Q68bSM7Ycu6FN28Q" Content-Disposition: inline In-Reply-To: <20210721001803.303dfba1@slackpad.fritz.box> X-Cookie: Many pages make a thick book. User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Q68bSM7Ycu6FN28Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 21, 2021 at 12:18:03AM +0100, Andre Przywara wrote: > On Wed, 21 Jul 2021 08:02:42 +1000 > Benjamin Herrenschmidt wrote: > > On Tue, 2021-07-20 at 17:16 +0100, Andre Przywara wrote: > > > Yes, a similar idea was already brought up before. I think there is e= ven > > > the potential for something like an artificial SMCCC "bus", where tho= se > > > services presentable as devices could be auto-detected (by checking > > > known function IDs), the respective drivers would then probe > > > automatically? =20 > > Sounds like a boot time killer... > How so? To be clear, at the moment there is basically just the TRNG > service we would probe for, maybe FF-A, then adding as we go. But in > any case it would be just a handful, and querying is very quick > (SMC/HVC, then just a switch/case on the other side, and ERET). > Is there any particular scenario you are concerned about? Quick > starting guests? It's also worth pointing out that we're already doing the enumeration part, making things a bus would just be about reorganising the code that checks if services are present to a central place so it looks more Linux style. If anything I'd guess that if we get to the point where things are slow enough to worry about having that code in one central place would make doing something about it easier (eg, adding a "list all services" service or firmware binding). --Q68bSM7Ycu6FN28Q Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmD4AicACgkQJNaLcl1U h9B1/Qf+POQrRjDcaawnwQmaPxlIW3/6Swx2huY1ofbdsQ/4vZlt6Ju2sXX1md1J LCNF+B2/pxjieNhz3Eswsf/LYr4+yeLtuHNgWsEmgcxSNhYBFvw6kjUn8/yUdsTR d2QItg/3wqqcitKz3DQnuylZPrbh46pgt9jboJUqYmnyvxgOrtwG1Va+ng692SKA cMvSib8oQQehNhQ3jl88EuJ2g1hoBKQlRrQkw8vpDLRpN7dZlSlEkzBaOZFsChKE dYptfBTDBx7RUYHWQT3GY4/xYcdcmH8ICSm2+WPRTy02qorgGyNnKwsJvf3BCbK4 zJhyg/66rMJExeRp2L/Cy+za+YxSlg== =8SIw -----END PGP SIGNATURE----- --Q68bSM7Ycu6FN28Q--