From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alex Williamson Subject: Re: [PATCH 3/4] VFIO: pci: amend vfio-pci for explicit binding via sysfs only Date: Mon, 28 Oct 2013 11:47:42 -0600 Message-ID: <1382982462.4097.38.camel@ul30vt.home> 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> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Cc: Bhushan Bharat , Wood Scott , Yoder Stuart , christoffer.dall@linaro.org, linux-kernel@vger.kernel.org, a.motakis@virtualopensystems.com, agraf@suse.de, Sethi Varun , peter.maydell@linaro.org, santosh.shukla@linaro.org, kvm@vger.kernel.org, gregkh@linuxfoundation.org To: Kim Phillips Return-path: In-Reply-To: <1381472840-3470-3-git-send-email-kim.phillips@linaro.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org 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, Alex > Signed-off-by: Kim Phillips > --- > drivers/vfio/pci/vfio_pci.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/vfio/pci/vfio_pci.c b/drivers/vfio/pci/vfio_pci.c > index 6ab71b9..bdd7833 100644 > --- a/drivers/vfio/pci/vfio_pci.c > +++ b/drivers/vfio/pci/vfio_pci.c > @@ -901,6 +901,9 @@ static struct pci_driver vfio_pci_driver = { > .probe = vfio_pci_probe, > .remove = vfio_pci_remove, > .err_handler = &vfio_err_handlers, > + .driver = { > + .sysfs_bind_only = true, > + }, > }; > > static void __exit vfio_pci_cleanup(void)