From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH 3/4] VFIO: pci: amend vfio-pci for explicit binding via sysfs only Date: Mon, 28 Oct 2013 13:09:52 -0500 Message-ID: <1382983792.3410.13.camel@snotra.buserror.net> References: <1381418830.7979.405.camel@snotra.buserror.net> <1381472840-3470-1-git-send-email-kim.phillips@linaro.org> <1381472840-3470-3-git-send-email-kim.phillips@linaro.org> <1382982462.4097.38.camel@ul30vt.home> <1382983205.3410.6.camel@snotra.buserror.net> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Kim Phillips , Bhushan Bharat , Wood Scott , Yoder Stuart , , , , , Sethi Varun , , , , To: Alex Williamson Return-path: In-Reply-To: <1382983205.3410.6.camel@snotra.buserror.net> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Mon, 2013-10-28 at 13:00 -0500, Scott Wood wrote: > On Mon, 2013-10-28 at 11:47 -0600, Alex Williamson wrote: > > On Fri, 2013-10-11 at 01:27 -0500, Kim Phillips wrote: > > > Force the vfio-pci driver to only be bound explicitly via sysfs to avoid > > > conflics with other drivers in the event of a hotplug. > > > > We can't break userspace, so we can't disable the current method of > > binding devices to vfio-pci. We can add a new method and perhaps > > deprecate the existing mechanism to be removed at some point in the > > future. Thanks, > > I thought the existing method involved using sysfs bind, and this was > just eliminating a race. How does the bind get triggered currently? OK, so it seems it's relying on the write to new_id calling driver_attach(). Sigh. I guess we could make driver-sysfs-bind-only be settable via sysfs, and have new-userspace set both that and PCI_ANY_ID (or the specific ID if userspace prefers) via new_id. The platform bus patches could continue as is, since there's no existing mechanism to break. -Scott