[Kimchi-devel] [PATCH v2] [Kimchi 0/2] Implement multi-function pci hotplug

Jose Ricardo Ziviani joserz at linux.vnet.ibm.com
Fri May 27 17:06:43 UTC 2016


v1 -> v2:
    Include the pci address in the guest xml even for function > 0.

This patchset implements multi-function pci hotplug for Kimchi. The
special point in it is the need to attach all functions at once (one xml
containing all devices) sorted (in reverse, the function 0 is the last
one). This logic also applies to hot unplug.

How to test the backend:
 - hotplug
curl -u username -H "Content-Type: application/json" -H "Accept: application/json" https://host:8001/plugins/kimchi/vms/0fed23/hostdevs -X POST -d '{"name": "pci_0001_05_00_1"}'
 - hotunplug
curl -u username -H "Content-Type: application/json" -H "Accept: application/json" https://host:8001/plugins/kimchi/vms/0fed23/hostdevs/pci_0001_05_00_0 -X DELETE

Note: it doesn't matter the function is chosen (pci_0001_05_00_0 or
pci_0001_05_00_1 in this case), both functions will be attached/detached accordingly.

Note2: attach/detach are async methods but UI is not reflecting it, it's
necessary to close/reopen the Edit window to see the PCI list updated.

Jose Ricardo Ziviani (2):
  Enable hot-plug multi-function pci on front-end
  Implement multi-function pci hotplug support

 model/vmhostdevs.py                 | 100 ++++++++++++++++++++++++++++++++----
 ui/js/src/kimchi.guest_edit_main.js |   2 +-
 2 files changed, 92 insertions(+), 10 deletions(-)

-- 
2.7.4




More information about the Kimchi-devel mailing list