From: Chunyan Liu <cyliu@xxxxxxxx> These patches implements a separate module for hostdev passthrough so that it could be shared by different drivers and can maintain a global state of a host device. Plus, add passthrough to libxl driver, and change qemu driver and lxc driver to use hostdev common library instead of their own hostdev APIs. --- Changes to v3: * fix Jim's comments v3 is here: https://www.redhat.com/archives/libvir-list/2013-August/msg00019.html Changes to v2: * add patches for qemu driver and lxc driver, use common library APIs instead of their own hostdev APIs. * add APIs for nodedev-detach and nodedev-reattach calling. * rename functions to use unified prefix 'virHostdev' * use VIR_ONCE_GLOBAL_INIT() as others instead of previous Init and Cleanup. * use VIR_STRDUP instead of strdup * rebase to latest code v2 is here: https://www.redhat.com/archives/libvir-list/2013-June/msg00263.html root (4): add hostdev passthrough common library add pci passthrough to libxl driver change qemu driver to use hostdev common library change lxc driver to use common library po/POTFILES.in | 3 +- src/Makefile.am | 3 +- src/libvirt_private.syms | 22 + src/libxl/libxl_conf.c | 63 ++ src/libxl/libxl_conf.h | 4 + src/libxl/libxl_driver.c | 262 +++++++- src/lxc/lxc_conf.h | 4 - src/lxc/lxc_driver.c | 45 +- src/lxc/lxc_hostdev.c | 413 ------------ src/lxc/lxc_hostdev.h | 43 -- src/lxc/lxc_process.c | 21 +- src/qemu/qemu_command.c | 1 - src/qemu/qemu_conf.h | 9 +- src/qemu/qemu_driver.c | 72 +-- src/qemu/qemu_hostdev.c | 1289 ----------------------------------- src/qemu/qemu_hostdev.h | 72 -- src/qemu/qemu_hotplug.c | 126 ++-- src/qemu/qemu_process.c | 34 +- src/util/virhostdev.c | 1679 ++++++++++++++++++++++++++++++++++++++++++++++ src/util/virhostdev.h | 129 ++++ src/util/virpci.c | 21 +- src/util/virpci.h | 7 +- src/util/virscsi.c | 22 +- src/util/virscsi.h | 8 +- src/util/virusb.c | 23 +- src/util/virusb.h | 8 +- 26 files changed, 2355 insertions(+), 2028 deletions(-) delete mode 100644 src/lxc/lxc_hostdev.c delete mode 100644 src/lxc/lxc_hostdev.h delete mode 100644 src/qemu/qemu_hostdev.c delete mode 100644 src/qemu/qemu_hostdev.h create mode 100644 src/util/virhostdev.c create mode 100644 src/util/virhostdev.h -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list