]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
xen/pciback: support driver_override
authorJuergen Gross <jgross@suse.com>
Thu, 22 Sep 2016 08:45:41 +0000 (10:45 +0200)
committerDavid Vrabel <david.vrabel@citrix.com>
Fri, 30 Sep 2016 10:49:02 +0000 (11:49 +0100)
commitb057878b2aadc7e06280e7e702a36e7adb1bcdf7
treece12e3a3cdf29554fabd7b8418a68283396fa35b
parent9f8bee9c981f5fe7382a0615d117cc128dd22458
xen/pciback: support driver_override

Support the driver_override scheme introduced with commit 782a985d7af2
("PCI: Introduce new device binding path using pci_dev.driver_override")

As pcistub_probe() is called for all devices (it has to check for a
match based on the slot address rather than device type) it has to
check for driver_override set to "pciback" itself.

Up to now for assigning a pci device to pciback you need something like:

echo 0000:07:10.0 > /sys/bus/pci/devices/0000\:07\:10.0/driver/unbind
echo 0000:07:10.0 > /sys/bus/pci/drivers/pciback/new_slot
echo 0000:07:10.0 > /sys/bus/pci/drivers_probe

while with the patch you can use the same mechanism as for similar
drivers like pci-stub and vfio-pci:

echo pciback > /sys/bus/pci/devices/0000\:07\:10.0/driver_override
echo 0000:07:10.0 > /sys/bus/pci/devices/0000\:07\:10.0/driver/unbind
echo 0000:07:10.0 > /sys/bus/pci/drivers_probe

So e.g. libvirt doesn't need special handling for pciback.

Signed-off-by: Juergen Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
drivers/xen/xen-pciback/pci_stub.c