• Juergen Gross's avatar
    xen/pciback: support driver_override · b057878b
    Juergen Gross authored
    Support the driver_override scheme introduced with commit 782a985d
    ("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: default avatarJuergen Gross <jgross@suse.com>
    Signed-off-by: default avatarDavid Vrabel <david.vrabel@citrix.com>
    b057878b
pci_stub.c 40.7 KB