
Hi, This patch series is to enable Kimchi to assign host PCI devices directly to a VM, thus greately improve VM performance. For example, pass through a NIC to VM to improve guest network throughput, or pass through a video card to VM to enable the guest OS to run 3D video games. Firstly, the user should be able to list all host devices in a tree, so as to determine which PCI devices should be passed through. Once a PCI device is assigned to VM, all the sub-device connected to it would be also assigned to VM. The device listing and device tree formatting is implemented in the patch "list all types of host devices" and "list all host devices in a tree". Secondly, the user should be able to pass the names of the host PCI devices to a VM template. Then the user can create a VM from the template, and the PCI devices would be automatically assigned to the VM when it starts, and automatically released when the VM is powered off. This is implemented in the patch "pass through PCI device to VM". The author also fixed a bug in VM template during the test. The fix is in patch "add disk size error message". All the patches are for back-end. The detailed implementation and testing method are written in the patch commit messages. Zhou Zheng Sheng (4): VM template: add disk size error message host pci pass through: list all types of host devices host pci pass through: list all host devices in a tree host pci pass through: pass through PCI device to VM docs/API.md | 18 +- src/kimchi/API.json | 24 ++- src/kimchi/control/host.py | 21 +++ src/kimchi/control/templates.py | 5 +- src/kimchi/featuretests.py | 9 + src/kimchi/hostdev.py | 307 +++++++++++++++++++++++++++++++++ src/kimchi/i18n.py | 14 ++ src/kimchi/mockmodel.py | 7 +- src/kimchi/model/config.py | 2 + src/kimchi/model/host.py | 15 +- src/kimchi/model/libvirtstoragepool.py | 18 +- src/kimchi/model/templates.py | 58 +++++++ src/kimchi/vmtemplate.py | 43 +++++ tests/test_rest.py | 6 +- tests/test_storagepool.py | 7 +- 15 files changed, 512 insertions(+), 42 deletions(-) create mode 100644 src/kimchi/hostdev.py -- 1.9.0