From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0A89EC433FE for ; Mon, 25 Oct 2021 13:34:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D082060F46 for ; Mon, 25 Oct 2021 13:34:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231241AbhJYNga (ORCPT ); Mon, 25 Oct 2021 09:36:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:44054 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230137AbhJYNg3 (ORCPT ); Mon, 25 Oct 2021 09:36:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 0B78460C49; Mon, 25 Oct 2021 13:34:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635168847; bh=TGM36HNRsET/pFtiRfUexbyoYySsw2F2J7sSYWaL4F0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cLwXICOQfBRit9X+o06XSrCCVKcm+8e9Lr8O3G353b3PJm27R/6kJBXEgUANF2Q13 yFo1+jzyeBnuifrTyxAID5+YW9BmeKBbwhl0bVxV6tMEmd9Ejq2LhPh+ZWRyqB1R7k mWNhnb3OIffD3fMCcsJpq/paMle0k8Ob1NPCM9PY= Date: Mon, 25 Oct 2021 15:34:05 +0200 From: Greg Kroah-Hartman To: Patrick Williams 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: dmaengine@vger.kernel.org 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: > > > > > > > We have the bind/unbind ability today, from userspace, that can control > > > > 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 "unbind" in > > > > sysfs, and then when all is done, it writes to the "bind" file and then > > > > Linux takes back over. > > > > > > > > Unless for some reason Linux should _not_ grab the device when booting, > > > > then things get messier, as we have seen in this thread. > > > > > > 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 would rip away > > > the BIOS chip from the running host. > > > > > > The BMC almost always needs to come up in a "I don't know what could possibly be > > > going on in the system" state and re-discover where the system was left off. > > > > Isn't it an architectural issue then? > > I'm not sure what "it" you are referring to here. > > 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. 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? thanks, greg k-h From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2D6CC433F5 for ; Mon, 25 Oct 2021 13:34:49 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4809160F46 for ; Mon, 25 Oct 2021 13:34:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4809160F46 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.ozlabs.org Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4HdGCW3w7Qz2yK3 for ; Tue, 26 Oct 2021 00:34:47 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=cLwXICOQ; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=linuxfoundation.org (client-ip=198.145.29.99; helo=mail.kernel.org; envelope-from=gregkh@linuxfoundation.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=cLwXICOQ; dkim-atps=neutral Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4HdGBq2Qbhz2xXc for ; Tue, 26 Oct 2021 00:34:10 +1100 (AEDT) Received: by mail.kernel.org (Postfix) with ESMTPSA id 0B78460C49; Mon, 25 Oct 2021 13:34:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635168847; bh=TGM36HNRsET/pFtiRfUexbyoYySsw2F2J7sSYWaL4F0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=cLwXICOQfBRit9X+o06XSrCCVKcm+8e9Lr8O3G353b3PJm27R/6kJBXEgUANF2Q13 yFo1+jzyeBnuifrTyxAID5+YW9BmeKBbwhl0bVxV6tMEmd9Ejq2LhPh+ZWRyqB1R7k mWNhnb3OIffD3fMCcsJpq/paMle0k8Ob1NPCM9PY= Date: Mon, 25 Oct 2021 15:34:05 +0200 From: Greg Kroah-Hartman To: Patrick Williams 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: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-BeenThere: openbmc@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development list for OpenBMC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Zev Weiss , "Rafael J. Wysocki" , Kirti Wankhede , Jeremy Kerr , Rajat Jain , Frank Rowand , Jianxiong Gao , Dave Jiang , kvm@vger.kernel.org, Saravana Kannan , Mauro Carvalho Chehab , openbmc@lists.ozlabs.org, devicetree@vger.kernel.org, Konrad Rzeszutek Wilk , Alex Williamson , Rob Herring , Bhaskar Chowdhury , Thomas Gleixner , Andy Shevchenko , Andrew Jeffery , Cornelia Huck , linux-kernel@vger.kernel.org, Vinod Koul , dmaengine@vger.kernel.org Errors-To: openbmc-bounces+openbmc=archiver.kernel.org@lists.ozlabs.org Sender: "openbmc" 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: > > > > > > > We have the bind/unbind ability today, from userspace, that can control > > > > 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 "unbind" in > > > > sysfs, and then when all is done, it writes to the "bind" file and then > > > > Linux takes back over. > > > > > > > > Unless for some reason Linux should _not_ grab the device when booting, > > > > then things get messier, as we have seen in this thread. > > > > > > 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 would rip away > > > the BIOS chip from the running host. > > > > > > The BMC almost always needs to come up in a "I don't know what could possibly be > > > going on in the system" state and re-discover where the system was left off. > > > > Isn't it an architectural issue then? > > I'm not sure what "it" you are referring to here. > > 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. 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? thanks, greg k-h