mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 22:25:25 +00:00
8639a42059
This patch makes sure that each network device ("interface") of type='hostdev' appears on both the hostdevs list and the nets list of the virDomainDef, and it modifies the qemu driver startup code so that these devices will be presented to qemu on the commandline as hostdevs rather than as network devices. It does not add support for hotplug of these type of devices, or code to honor the <mac address> or <virtualport> given in the config (both of those will be done in separate patches). Once each device is placed on both lists, much of what this patch does is modify places in the code that traverse all the device lists so that these hybrid devices are only acted on once - either along with the other hostdevs, or along with the other network interfaces. (In many cases, only one of the lists is traversed / a specific operation is performed on only one type of device. In those instances, the code can remain unchanged.) There is one special case - when building the commandline, interfaces are allowed to proceed all the way through networkAllocateActualDevice() before deciding to skip the rest of netdev-specific processing - this is so that (once we have support for networks with pools of hostdev devices) we can get the actual device allocated, then rely on the loop processing all hostdevs to generate the correct commandline. (NB: <interface type='hostdev'> is only supported for PCI network devices that are SR-IOV Virtual Functions (VF). Standard PCI[e] and USB devices, and even the Physical Functions (PF) of SR-IOV devices can only be assigned to a guest using the more basic <hostdev> device entry. This limitation is mostly due to the fact that non-SR-IOV ethernet devices tend to lose mac address configuration whenever the card is reset, which happens when a card is assigned to a guest; SR-IOV VFs fortunately don't suffer the same problem.) |
||
---|---|---|
.. | ||
capabilityschemadata | ||
commanddata | ||
confdata | ||
cputestdata | ||
domainschemadata | ||
domainsnapshotxml2xmlin | ||
domainsnapshotxml2xmlout | ||
interfaceschemadata | ||
networkxml2argvdata | ||
networkxml2xmlin | ||
networkxml2xmlout | ||
nodedevschemadata | ||
nodeinfodata | ||
nwfilterxml2xmlin | ||
nwfilterxml2xmlout | ||
qemuhelpdata | ||
qemuxml2argvdata | ||
qemuxml2xmloutdata | ||
qemuxmlnsdata | ||
sexpr2xmldata | ||
storagepoolxml2xmlin | ||
storagepoolxml2xmlout | ||
storagevolxml2xmlin | ||
storagevolxml2xmlout | ||
vmx2xmldata | ||
xencapsdata | ||
xmconfigdata | ||
xml2sexprdata | ||
xml2vmxdata | ||
.valgrind.supp | ||
capabilityschematest | ||
commandhelper.c | ||
commandtest.c | ||
conftest.c | ||
cpuset | ||
cputest.c | ||
daemon-conf | ||
define-dev-segfault | ||
domainschematest | ||
domainsnapshotschematest | ||
domainsnapshotxml2xmltest.c | ||
esxutilstest.c | ||
eventtest.c | ||
int-overflow | ||
interfaceschematest | ||
interfacexml2xmltest.c | ||
jsontest.c | ||
libvirtd-fail | ||
libvirtd-pool | ||
Makefile.am | ||
networkschematest | ||
networkxml2argvtest.c | ||
networkxml2xmltest.c | ||
nodedevschematest | ||
nodedevxml2xmltest.c | ||
nodeinfotest.c | ||
nwfilterschematest | ||
nwfilterxml2xmltest.c | ||
object-locking.ml | ||
oomtrace.pl | ||
openvzutilstest.c | ||
openvzutilstest.conf | ||
pkix_asn1_tab.c | ||
qemuargv2xmltest.c | ||
qemuhelptest.c | ||
qemumonitortest.c | ||
qemuxml2argvtest.c | ||
qemuxml2xmltest.c | ||
qemuxmlnstest.c | ||
qparamtest.c | ||
read-bufsiz | ||
read-non-seekable | ||
reconnect.c | ||
schematestutils.sh | ||
seclabeltest.c | ||
sexpr2xmltest.c | ||
shunloadhelper.c | ||
shunloadtest.c | ||
sockettest.c | ||
ssh.c | ||
start | ||
statstest.c | ||
storagepoolschematest | ||
storagepoolxml2xmltest.c | ||
storagevolschematest | ||
storagevolxml2xmltest.c | ||
test_conf.sh | ||
test-lib.sh | ||
testutils.c | ||
testutils.h | ||
testutilsqemu.c | ||
testutilsqemu.h | ||
testutilsxen.c | ||
testutilsxen.h | ||
undefine | ||
utiltest.c | ||
vcpupin | ||
virbuftest.c | ||
virhashdata.h | ||
virhashtest.c | ||
virnetmessagetest.c | ||
virnetsockettest.c | ||
virnettlscontexttest.c | ||
virsh-all | ||
virsh-optparse | ||
virsh-schedinfo | ||
virsh-synopsis | ||
virshtest.c | ||
virt-aa-helper-test | ||
virtimetest.c | ||
vmx2xmltest.c | ||
xencapstest.c | ||
xmconfigtest.c | ||
xml2sexprtest.c | ||
xml2vmxtest.c |