[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 11 Nov 2012 06:21:52 +0100
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Jiang Liu <liuj97@...il.com>
Cc: Alex Williamson <alex.williamson@...hat.com>,
Yinghai Lu <yinghai@...nel.org>,
Jiang Liu <jiang.liu@...wei.com>,
Joerg Roedel <joerg.roedel@....com>, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, Hanjun Guo <guohanjun@...wei.com>
Subject: Re: [RFC PATCH 1/6] driver core: add a bus notification to
temporarily reject driver binding
On Sat, Nov 10, 2012 at 09:57:14PM +0800, Jiang Liu wrote:
> From: Jiang Liu <jiang.liu@...wei.com>
>
> There are several requirements to temporarily reject device driver
> binding. Possible usage cases as below:
> 1) We should avoid binding an unsafe driver to a device belonging to
> an active VFIO group, otherwise it will break the DMA isolation
> property of VFIO.
> 2) When hot-removing a PCI hierachy, we should avoid binding device
> drivers to PCI devices going to be removed during the window
> between unbinding of device driver and destroying of device nodes.
> 3) When hot-adding a PCI host bridge, we should temporarily disable
> driver binding before setting up corresponding IOMMU and IOAPIC.
>
> We may add a flag into struct device to temporarily disable driver
> binding as in this thread https://patchwork.kernel.org/patch/1535721/.
I totally do not understand. The bus controls this, if it does not want
to bind a device to a driver, then don't do it. It's really quite
simple to just block the probe callback the bus gets, right? Why create
all of this extra, and confusing, interface instead?
> This patch proposes another solution to temporarily disable driver
> binding by using bus notification mechanisms. It adds an notification
> event to solicit if anybody has objections when binding a driver to a
> device.
Sorry, but no, don't do this, it's way more confusing.
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists