Chunyan Liu
6225cb3df5
add pci passthrough to libxl driver
...
Add pci passthrough to libxl driver, support attach-device, detach-device and
start a vm with pci hostdev specified.
2014-03-12 17:03:50 +00:00
Chunyan Liu
98c5c53d69
add hostdev pci backend type for xen
...
Add VIR_DOMAIN_HOSTDEV_PCI_BACKEND_XEN. For legacy xen, it will use "pciback" as
stub driver.
2014-03-12 17:03:23 +00:00
Chunyan Liu
53aba258b2
change lxc_hostdev.c to use virhostdev common library APIs
2014-03-12 17:03:18 +00:00
Chunyan Liu
cd618e0212
add unit test for new virhostdev common library
...
Add unit test for hostdev common library. Current tests are based on virpcimock.
2014-03-12 17:03:16 +00:00
Chunyan Liu
7becc46225
Add parameter checks/annotations to hostdev APIs
...
Mark many parameters as NONNULL and check for empty list of
hostdevs.
2014-03-12 16:53:33 +00:00
Chunyan Liu
e991b09ddd
add 3 wrapper functions for prepare/reattach/update domain hostdevs
2014-03-12 16:53:20 +00:00
Chunyan Liu
4dd9f103fa
improve virHostdevUpdate* parameters to make it more widely used
...
Changes parameter from vm def to specific hostdevs info and name info, so that
it could be used more widely, e.g, could be used without full vm def info.
2014-03-12 16:41:32 +00:00
Daniel P. Berrange
a65e6d3626
Capitalize USB, PCI and SCSI in hostdev variables
...
Change any variable names with Usb, Pci or Scsi to use
USB, PCI and SCSI since they are abbreviations.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2014-03-12 16:38:18 +00:00
Daniel P. Berrange
e9a60dcc7c
Remove redundant duplicated 'Hostdev' string method names
...
Some virHostdevXXXX methods included the string Hostdev again
as a suffix. Change the latter to Device instead.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2014-03-12 16:35:30 +00:00
Chunyan Liu
7be4bddea1
Capitalize USB, PCI and SCSI in hostdev methods
...
Change any method names with Usb, Pci or Scsi to use
USB, PCI and SCSI since they are abbreviations.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2014-03-12 16:20:01 +00:00
Daniel P. Berrange
b4bbaeef41
Fixed const-ness of parameters in netdev/hostdev code
...
Various methods in virnetdev.c and virhostdev.c were missing
const-ness for several char * parameters.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2014-03-12 16:03:06 +00:00
Chunyan Liu
1c6ee84c9d
improve parameter name to let it more meaningful
2014-03-12 16:03:06 +00:00
Chunyan Liu
1fabf06ca5
move virHostdevNodeDevice* to virhostdev.c
2014-03-12 16:03:06 +00:00
Chunyan Liu
de4aace4b0
extract general code of NodeDeviceReset
2014-03-12 16:03:06 +00:00
Chunyan Liu
1f12cef642
extract general code of NodeDeviceReAttach
2014-03-12 16:03:06 +00:00
Chunyan Liu
fdb313c4b2
extract general code of NodeDeviceDetach
2014-03-12 16:03:06 +00:00
Chunyan Liu
a4797138ad
move virHostdevReAttachHostScsiDevices to virhostdev.c
2014-03-12 16:03:06 +00:00
Chunyan Liu
1136b8c153
pass driver name as parameter to virHostdevReAttachScciHostdevs
2014-03-12 16:03:06 +00:00
Chunyan Liu
b473b58344
extract general code from qemuDomainReAttachHostScsiDevices
...
Extract general code from qemuDomainReAttachHostScsiDevices to
virHostdevDomainReAttachHostScsiDevices.
2014-03-12 16:03:06 +00:00
Chunyan Liu
2d961cf3ba
move virHostdevReAttachUsbHostdevs to virhostdev.c
2014-03-12 16:03:05 +00:00
Chunyan Liu
1ba06c3adf
pass driver name as paramter to virHostdevReAttachUsbHostdevs
2014-03-12 16:03:05 +00:00
Chunyan Liu
08ae90266a
extract general code from qemuDomainReAttachHostUsbDevices
...
Extract general code from qemuDomainReAttachHostUsbDevices to
virHostdevDomainReAttachHostUsbDevices.
2014-03-12 16:03:05 +00:00
Chunyan Liu
5035f75fed
move virHostdevPrepareHostSCSIDevices to virhostdev.c
2014-03-12 16:03:05 +00:00
Chunyan Liu
c82c274581
pass driver name as parameter to virHostdevPrepareSCSIDevices
2014-03-12 16:03:05 +00:00
Chunyan Liu
313437ac64
extract general code from qemuPrepareHostSCSIDevices
...
Extract general code from qemuPrepareHostSCSIDevices to
virHostdevPrepareHostSCSIDevices.
2014-03-12 16:03:05 +00:00
Chunyan Liu
1c310c609c
move virHostdevPrepareHostUSBDevices to virhostdev.c
2014-03-12 16:03:05 +00:00
Chunyan Liu
7972571142
pass driver name to virHostdevPrepareUSBDevices
2014-03-12 16:03:05 +00:00
Chunyan Liu
27da1757c8
rename qemu*USBDevices to virHostdev*USBDevices
2014-03-12 16:03:05 +00:00
Chunyan Liu
b7508481f1
extract general code from qemuPrepareHostUSBDevices
...
Extract general code from qemuPrepareHostUSBDevices to
virHostdevPrepareHostUSBDevices.
2014-03-12 16:03:05 +00:00
Chunyan Liu
00729f4559
move virHostdevUpdate* functions to virhostdev.c
2014-03-12 16:03:05 +00:00
Chunyan Liu
d44a20470e
pass driver_name as parameter of virHostdevUpdate*Hostdevs functions
2014-03-12 16:03:05 +00:00
Chunyan Liu
e57f929dc1
extract general code from qemuUpdateActiveScsiHostdevs
...
Extract general code from qemuUpdateActiveScsiHostdevs to
virHostdevUpdateActiveScsiHostdevs
2014-03-12 16:03:05 +00:00
Chunyan Liu
ccf9d0f392
extract general code from qemuUpdateActiveUsbHostdevs
...
Extract general code from qemuUpdateActiveUsbHostdevs to
virHostdevUpdateActiveUsbHostdevs.
2014-03-12 16:03:05 +00:00
Chunyan Liu
94d505ba15
extract general code from qemuUpdateActivePciHostdevs
...
Extract general code from qemuUpdateActivePciHostdevs to
virHostdevUpdateActivePciHostdevs.
2014-03-12 16:03:05 +00:00
Chunyan Liu
899b261127
move virHostdevPrepare(ReAttach)PCIDevices to virhostdev.c
2014-03-12 16:03:05 +00:00
Daniel P. Berrange
63d4dd0336
rename qemuReAttachPciDevice to virHostdevReAttachPciDevice
...
Signed-off-by: Chunyan Liu <cyliu@suse.com>
2014-03-12 16:03:05 +00:00
Chunyan Liu
82e8dd4cf8
Conditionally wait for kvm_assigned_device cleanup
...
Only wait for kvm device cleanup if the driver is pci-stub
2014-03-12 16:03:05 +00:00
Chunyan Liu
4e46107e43
pass driver name as a parameter to virHostdevReAttachPCIDevices
2014-03-12 16:03:04 +00:00
Chunyan Liu
66dbc559a2
extract general code from qemuDomainReAttachHostdevDevices
2014-03-12 16:03:04 +00:00
Chunyan Liu
24786df527
pass driver name as a parameter to virHostdevPrepareHostdevPCIDevices
2014-03-12 16:03:04 +00:00
Chunyan Liu
4a3bc4902d
rename qemuGet*PciHostDeviceList to virHostdevGet*PciHostDeviceList
2014-03-12 16:03:04 +00:00
Chunyan Liu
5a4f783608
rename qemu*NetConfigRestore/Replace to virHostdevNetConfigRestore/Replace
2014-03-12 16:03:04 +00:00
Chunyan Liu
996af57387
extract general code from qemuPrepareHostdevPCIDevices
...
Extract general code from qemuPrepareHostdevPCIDevices to
virHostdevPrepareHostdevPCIDevices.
2014-03-12 16:03:04 +00:00
Chunyan Liu
2c71d38269
qemu_hostdev: move netconfig file location to virhostdev stateDir
2014-03-12 16:03:04 +00:00
Chunyan Liu
e3c9e3a35b
qemu_hostdev: move ColdBoot as a flag
...
For extracting hostdev codes from qemu_hostdev.c to common library, change qemu
specific COLD_BOOT handling to be a flag, and pass it to hostdev functions.
2014-03-12 16:03:04 +00:00
Chunyan Liu
3a331da883
qemu_hostdev: move cfg->relaxedACS as a flag
...
For extracting hostdev codes from qemu_hostdev.c to common library, change qemu
specific cfg->relaxedACS handling to be a flag, and pass it to hostdev
functions.
2014-03-12 16:03:04 +00:00
Chunyan Liu
0d4efed02b
lxc: use general virhostdev lists instead of its own
2014-03-12 16:03:04 +00:00
Chunyan Liu
e640e98fa4
qemu: use general virhostdev lists instead of its own
2014-03-12 16:03:04 +00:00
Chunyan Liu
b5d5eb9bc5
qemu: remove functions used internally only from qemu_hostdev.h
2014-03-12 16:03:04 +00:00
Chunyan Liu
802c59d4b9
qemu: reuse hostdev interfaces to avoid duplicate
...
Same logic of preparing/reattaching hostdevs could be used in attach/detach
hotplug places, so reuse hostdev interfaces to avoid duplicate, also for later
extracting general code to common library.
2014-03-12 16:03:04 +00:00