This patch sets include two patches: 1/2 is the implementation of the hostdev passthrough common library. To meet two purposes: a. move qemu hostdev APIs to common library so that it could be used by all hypervisor drivers. b. maintain a global hostdev in-use state. 2/2 is the implementation of pci passthrough to libxl driver. There should be more patches to change qemu driver and lxc driver codes to switch to common library APIs, but I think it's better to have you review the common library first. After common library APIs confirmed, then modify qemu/lxc driver codes in a time. The implementation to libxl driver (2/2) is an example of using common library. Please review, thanks! Chunyan Liu (2): add pci passthrough common library add pci passthrough impl to libxl po/POTFILES.in | 1 + src/Makefile.am | 1 + src/libvirt.c | 5 + src/libvirt_private.syms | 15 + src/libxl/libxl_conf.c | 44 ++ src/libxl/libxl_driver.c | 21 +- src/util/virhostdevmanager.c | 1218 ++++++++++++++++++++++++++++++++++++++++++ src/util/virhostdevmanager.h | 91 ++++ src/util/virpci.c | 17 +- src/util/virpci.h | 7 +- src/util/virusb.c | 19 +- src/util/virusb.h | 4 +- 12 files changed, 1426 insertions(+), 17 deletions(-) create mode 100644 src/util/virhostdevmanager.c create mode 100644 src/util/virhostdevmanager.h -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list