Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp247271pxb; Mon, 25 Oct 2021 07:33:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypabS3+x2iSFu8cgo2eOtpPjEJnT7e6IKRGs4eZzXviCIlEjyI4TEn9yQ9AlUqwvOYikrb X-Received: by 2002:a63:e516:: with SMTP id r22mr14247935pgh.197.1635172407043; Mon, 25 Oct 2021 07:33:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635172407; cv=none; d=google.com; s=arc-20160816; b=ASGqr6eSUUK4dQvwR5+qNutFtj77nAotZ4iPvF5jv3lcGWOC9NgE6WtyGQ9t4dC+Zf mDmzqi9SShPhaV9bjI/acT1ebvDwsNJ5RAWp1XDXKyQ5Iqktcs/B6EbFTYIGqnlXFOZw NDExIEcF+ugGbggt/i8EiaN1iINqXM22mCt91N7R9AbfyiKbU66YH5uX1zYQUWzuPMuS i6Kxf2LRLXru5Ac1oK7JOkCJXhehWarU/TYxEkSmJlLzYzOQ//XOeTmi/4aWUr69dX0f Ovx1hGeh9oyU/0Ao6upGW/kASil9XAdYg2+poQoruW4Gwsikb2bGzsDbApCI8wesvv+K xHfA== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=O6Np07LYkZtpx8/b2Te8NTLkiKkVX2DZfHpr39ip9Jo=; b=teBllO7x414XyYLNI/Gy/eTalcBgDW4CCMeKEmvF8p4HBT/U45OHptUKQeHhBmdgti P6bs4l+m6Jl9K9346YkeUEYbCp3Q36BKTI9qrInul9RFqW3ITXcG/g8LNgCfwU4ceUAb W6JOWnSDv2teK4CyWJu3VlFgKdBvj3Nx6QgfpcAVzAvm956IVWpD4D4eZcemsk4tWrP3 KR2gyujgEaE19hxIdUEHjFcB/lKvEST4jf5R38ZiOFGSpmPlpqUt/ggi5VnfZcS0K3Wk Oat4/f9LsYlXGZ2cutDaAmlDdceJy1ZD3O8MeALx2R4kXPPWBeGEjKDbaatCvZjZizrS Zwvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@stwcx.xyz header.s=fm3 header.b=MsqHVKYy; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=H162o6ep; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d1si6056198plg.437.2021.10.25.07.33.13; Mon, 25 Oct 2021 07:33:27 -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=@stwcx.xyz header.s=fm3 header.b=MsqHVKYy; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=H162o6ep; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233219AbhJYOFI (ORCPT + 99 others); Mon, 25 Oct 2021 10:05:08 -0400 Received: from new3-smtp.messagingengine.com ([66.111.4.229]:49005 "EHLO new3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230396AbhJYOFH (ORCPT ); Mon, 25 Oct 2021 10:05:07 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 5A360580533; Mon, 25 Oct 2021 10:02:44 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 25 Oct 2021 10:02:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stwcx.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm3; bh=O6Np07LYkZtpx8/b2Te8NTLkiKk VX2DZfHpr39ip9Jo=; b=MsqHVKYy1WAnwZ/e+pNN5dj1T2Lq1ngAHAiRd1yBBkt t5vPgfG4f7JIkRTGfhmkR4g9tvM27H675x/ftgn6aJTCQ2a39OsUhhUQYkSHYyDd bbMAfLAHekPFqPYv+rD4sg5zm0xzu97sQp4F7oXUhpBYoLu8/5lxQl2E58fwhtk/ xPdURmuLE/oO0om/LB47rpbjjrEx7/F492oGODWQtPgiv8BnxoHCVAbVzRnQTgD/ M+J5qfQYuoN8hR3+VwMIumcE4I1KGDn0iBzcbFK8Ko2AgiHZNZwNECNMLUjaHgeB 0UYzP5trnADbf6eYd0+wuIC4cl+AF2z+XZ/+kL39nEw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=O6Np07 LYkZtpx8/b2Te8NTLkiKkVX2DZfHpr39ip9Jo=; b=H162o6epW7+NZUqB1LuU5E 0j/x+8H/78SJ7bfvRDULdowqpkv3zbdEDzLF2J8z5YhGZWdSJtm68YUtNfsST+i0 GbgBJs8U6LDXSgT6suua4tAqKQpUMDAv1KoM+mZtp9an0iciVY4wIJFrX9VtsF91 TwTLfW8zY1Qszaz3ltiDigKqggEry2j3c1RKM75h1lZkTmaSrozrqdh6g+fBsWws DIeXnONVG2GGg8tcTX4fs01ODzE5xvRpaGbPuBDnQNgXiM+1Ixh5S+RwPkmJAv6/ 3xVDpfFigtbXWC0zdQu8fKbwEFVzqBfNysHkcJVkjfTkdQ9zhqNW49ypGmnYPNlA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefhedgieekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomheprfgrthhrihgtkhcuhghilhhlihgrmhhsuceophgrthhrihgtkhessh htfigtgidrgiihiieqnecuggftrfgrthhtvghrnhepgeehheefffegkeevhedthffgudfh geefgfdthefhkedtleffveekgfeuffehtdeinecuvehluhhsthgvrhfuihiivgeptdenuc frrghrrghmpehmrghilhhfrhhomhepphgrthhrihgtkhesshhtfigtgidrgiihii X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 25 Oct 2021 10:02:42 -0400 (EDT) Date: Mon, 25 Oct 2021 09:02:40 -0500 From: Patrick Williams To: Greg Kroah-Hartman Cc: Andy Shevchenko , Frank Rowand , Zev Weiss , kvm@vger.kernel.org, "Rafael J. Wysocki" , Kirti Wankhede , Jeremy Kerr , Rajat Jain , Jianxiong Gao , Dave Jiang , Saravana Kannan , Mauro Carvalho Chehab , openbmc@lists.ozlabs.org, devicetree@vger.kernel.org, Konrad Rzeszutek Wilk , Alex Williamson , Rob Herring , Bhaskar Chowdhury , Thomas Gleixner , Andrew Jeffery , Cornelia Huck , linux-kernel@vger.kernel.org, Vinod Koul , dmaengine@vger.kernel.org Subject: Re: [PATCH 4/5] driver core: inhibit automatic driver binding on reserved devices Message-ID: References: <627101ee-7414-57d1-9952-6e023b8db317@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="Cj4fc/vm/r+op96T" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --Cj4fc/vm/r+op96T Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 25, 2021 at 03:34:05PM +0200, Greg Kroah-Hartman wrote: > On Mon, Oct 25, 2021 at 08:20:05AM -0500, Patrick Williams wrote: > > On Mon, Oct 25, 2021 at 03:58:25PM +0300, Andy Shevchenko wrote: > > > On Mon, Oct 25, 2021 at 06:44:26AM -0500, Patrick Williams wrote: > > > > On Mon, Oct 25, 2021 at 08:15:41AM +0200, Greg Kroah-Hartman wrote: > > > > > On Mon, Oct 25, 2021 at 12:38:08AM -0500, Frank Rowand wrote: > > > > > > On 10/23/21 3:56 AM, Greg Kroah-Hartman wrote: > > > > =20 > > > > > We have the bind/unbind ability today, from userspace, that can c= ontrol > > > > > this. Why not just have Linux grab the device when it boots, and= then > > > > > when userspace wants to "give the device up", it writes to "unbin= d" in > > > > > sysfs, and then when all is done, it writes to the "bind" file an= d then > > > > > Linux takes back over. > > > > >=20 > > > > > Unless for some reason Linux should _not_ grab the device when bo= oting, > > > > > then things get messier, as we have seen in this thread. > > > >=20 > > > > This is probably more typical on a BMC than atypical. The systems = often require > > > > the BMC (running Linux) to be able to reboot independently from the= managed host > > > > (running anything). In the example Zev gave, the BMC rebooting wou= ld rip away > > > > the BIOS chip from the running host. > > > >=20 > > > > The BMC almost always needs to come up in a "I don't know what coul= d possibly be > > > > going on in the system" state and re-discover where the system was = left off. > > >=20 > > > Isn't it an architectural issue then? > >=20 > > I'm not sure what "it" you are referring to here. > >=20 > > I was trying to explain why starting in "bind" state is not a good idea= for a > > BMC in most of these cases where we want to be able to dynamically add = a device. >=20 > I think "it" is "something needs to be the moderator between the two > operating systems". What is the external entity that handles the > switching between the two? Ah, ok. Those usually end up being system / device specific. In the case of the BI= OS flash, most designs I've seen use a SPI mux between the BMC and the host processor or IO hub (PCH on Xeons). The BMC has a GPIO to control the mux. As far as state, the BMC on start-up will go through a set of discovery cod= e to figure out where it left the system prior to getting reset. That involves looking at the power subsystem and usually doing some kind of query to the = host to see if it is alive. These queries are mostly system / host-processor de= sign specific. I've seen anything from an IPMI/IPMB message alert from the BMC = to the BIOS to ask "are you alive" to reading host processor state over JTAG to figure out if the processors are "making progress". --=20 Patrick Williams --Cj4fc/vm/r+op96T Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEBGD9ii4LE9cNbqJBqwNHzC0AwRkFAmF2uP4ACgkQqwNHzC0A wRn2MQ/+IbWA2k0pqRbmsaz95jJj6QR4JWyOn//T7Ij+0GUqzRAjI79orT7opNkA sMhniF8v7xDUEGual2v2hEBoxtJxom3R8RgC0sQuxRFhmxdJlXCZZRqw4a42YNZN 3ZspVBl3p7m9E3q9e8oI2yWP3RNJHErMhQJmIsw3osURrtSFCk5xdFkUMEXmzpou OFIxkcbKtLgi7TJ7/i9c3ubm3CExijLeUqAYr+BZHox727nQfc0ni30+KZYaTjof qZ6fUj890s6G9u9w1NTW+z8wzYZLhhQlB44WYBL4Ax46713+TmZnhhym5k0aD9Fh bh6jyfJRI7cuxXInS/uCIAqTipaI3TsNCglHZSSoLJ2E+4pLQXc/eRNRVr6Urmor Ut+Xv6tm9QEW4MkoTn4EpN1xTkmhczRYI6FRTal7QC0rRgOn6LN+V8UM57cmig7O L/wX0eUjUT7qLjmv0zReTGpjgvU1KzYr7J5riCZJuuwosvJU10sJfPaRlNR3NJ7x BPd+5vYifZsODphSc5IQojlCGwnTVrsbqsYWpb42ik+nLpCdfGiFYBvLCkmIfmWa FD+IMGh+V7Bt+DatdxLmEFTvIzEb4UrNM5+1PM/1UynD3NvJVUDbEKMlszRHKl6u /L+NyvjwozFI7/57T1YSk0DZPNSl7mazsNuL8UC3BXgixfw86wI= =z+8H -----END PGP SIGNATURE----- --Cj4fc/vm/r+op96T--