]> xenbits.xensource.com Git - libvirt.git/commit
Add host PCI device hotplug support
authorMark McLoughlin <markmc@redhat.com>
Fri, 14 Aug 2009 07:31:10 +0000 (08:31 +0100)
committerMark McLoughlin <markmc@redhat.com>
Fri, 14 Aug 2009 07:31:10 +0000 (08:31 +0100)
commit0c5b7b93a3cdb197c55d79c2605e9e19e3af43f5
treed797740b917720ae8e59a8f88bb94b026d8b4ffe
parent7636ef4630fc15c3d559eceb5b5c4fb1524b7c5a
Add host PCI device hotplug support

Attaching a host PCI device to a qemu guest is done with a
straightforward 'pci_add auto host host=XX:XX.X' command.

Like with NIC and disk hotplug, we need to retain the guest PCI address
assigned by qemu so that we can use it for hot-unplug.

Identifying a device for detach is done using the host PCI address.

Managed mode is handled by detaching/resetting the device before
attaching it to the guest and re-attaching it after detaching it from
the guest.

* src/qemu_driver.c: add qemudDomainAttachHostPciDevice() and
  qemudDomainDetachHostPciDevice()

* src/domain_conf.h: add somewhere to store the guest PCI address

* src/domain_conf.c: handle formatting and parsing the guest PCI
  address
src/domain_conf.c
src/domain_conf.h
src/qemu_driver.c