diff options
author | George Dunlap <george.dunlap@eu.citrix.com> | 2012-05-15 16:28:15 +0100 |
---|---|---|
committer | George Dunlap <george.dunlap@eu.citrix.com> | 2012-05-15 16:28:15 +0100 |
commit | 039a5e5322fcf5cdcff2315db11cdd46919db534 (patch) | |
tree | 2dc08644d79e034b26f1de2ce0d127b771f74981 /docs/man | |
parent | 0773a6e830f805cc288a3f542daa67be400be1cd (diff) | |
download | xen-039a5e5322fcf5cdcff2315db11cdd46919db534.tar.gz xen-039a5e5322fcf5cdcff2315db11cdd46919db534.tar.bz2 xen-039a5e5322fcf5cdcff2315db11cdd46919db534.zip |
libxl: Introduce pci_assignable_add and pci_assignable_remove
Introduce libxl helper functions to prepare devices to be passed
through to guests. This is meant to replace of all the manual sysfs
commands which are currently required.
pci_assignable_add accepts a BDF for a device and will:
* Unbind a device from its current driver, if any
* If "rebind" is set, it will store the path of the driver from which we
unplugged it in /libxl/pciback/$BDF/driver_path
* If create a slot for it in pciback if one doesn't yet exist
* Bind the device to pciback
At this point it will show up in pci_assignable_list, and is ready to
be passed through to a guest.
pci_assignable_remove accepts a BDF for a device and will:
* Unbind the device from pciback
* Remove the slot from pciback
* If "rebind" is set, and /libx/pciback/$BDF/driver_path exists, it
will attempt to rebind the device to its original driver.
Both functions are idempotent: if the desired end state has already
been reached, they return SUCCESS.
NB that "$BDF" in this case uses '-' instead of ':' and '.', because
':' and '.' are illegal characters in xenstore paths.
Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'docs/man')
0 files changed, 0 insertions, 0 deletions