libvirt/tests
Laine Stump c329db7180 qemu: make PCI multifunction support more manual
When support for was added for PCI multifunction cards (in commit
9f8baf, first included in libvirt 0.9.3), it was done by always
turning on the multifunction bit for all PCI devices. Since that time
it has been realized that this is not an ideal solution, and that the
multifunction bit must be selectively turned on. For example, see

  https://bugzilla.redhat.com/show_bug.cgi?id=728174

and the discussion before and after

  https://www.redhat.com/archives/libvir-list/2011-September/msg01036.html

This patch modifies multifunction support so that the multifunction=on
option is only added to the qemu commandline for a device if its PCI
<address> definition has the attribute "multifunction='on'", e.g.:

  <address type='pci' domain='0x0000' bus='0x00'
           slot='0x04' function='0x0' multifunction='on'/>

In practice, the multifunction bit should only be turned on if
function='0' AND other functions will be used in the same slot - it
usually isn't needed for functions 1-7 (although there are apparently
some exceptions, e.g. the Intel X53 according to the QEMU source
code), and should never be set if only function 0 will be used in the
slot. The test cases have been changed accordingly to illustrate.

With this patch in place, if a user attempts to assign multiple
functions in a slot without setting the multifunction bit for function
0, libvirt will issue an error when the domain is defined, and the
define operation will fail. In the future, we may decide to detect
this situation and automatically add multifunction=on to avoid the
error; even then it will still be useful to have a manual method of
turning on multifunction since, as stated above, there are some
devices that excpect it to be turned on for all functions in a slot.

A side effect of this patch is that attempts to use the same PCI
address for two different devices will now log an error (previously
this would cause the domain define operation to fail, but there would
be no log message generated). Because the function doing this log was
almost completely rewritten, I didn't think it worthwhile to make a
separate patch for that fix (the entire patch would immediately be
obsoleted).
2011-10-01 11:48:28 -04:00
..
capabilityschemadata microblaze: Add architecture support 2011-07-07 17:49:21 -06:00
commanddata freebsd: Avoid /bin/true in commandtest 2011-07-29 12:12:58 +02:00
confdata
cputestdata
domainschemadata
domainsnapshotxml2xmlin snapshot: also support disks by path 2011-09-05 07:03:04 -06:00
domainsnapshotxml2xmlout snapshot: add <disks> to snapshot xml 2011-09-05 07:03:04 -06:00
interfaceschemadata Update interface.rng and xml test files to match netcf 0.1.5 2010-01-19 21:13:03 +01:00
networkxml2argvdata network: don't forward DNS requests from isolated networks 2011-07-29 17:23:55 -04:00
networkxml2xmlin bandwidth: Add test cases for network 2011-07-25 13:50:06 +08:00
networkxml2xmlout bandwidth: Add test cases for network 2011-07-25 13:50:06 +08:00
nodedevschemadata
nodeinfodata
nwfilterxml2xmlin nwfilter: enable filtering of gratuitous ARP packets 2011-05-23 19:41:18 -04:00
nwfilterxml2xmlout nwfilter: enable filtering of gratuitous ARP packets 2011-05-23 19:41:18 -04:00
qemuhelpdata
qemuxml2argvdata qemu: make PCI multifunction support more manual 2011-10-01 11:48:28 -04:00
qemuxml2xmloutdata conf: add <listen> subelement to domain <graphics> element 2011-07-28 13:46:39 -04:00
sexpr2xmldata conf: add <listen> subelement to domain <graphics> element 2011-07-28 13:46:39 -04:00
storagepoolxml2xmlin
storagepoolxml2xmlout
storagevolxml2xmlin
storagevolxml2xmlout
vmx2xmldata esx: Fix regression in absolute file name handling 2011-05-26 23:32:44 +02:00
xencapsdata
xmconfigdata conf: add <listen> subelement to domain <graphics> element 2011-07-28 13:46:39 -04:00
xml2sexprdata Do not drop kernel cmdline for xen pv domains 2011-07-11 09:11:15 -06:00
xml2vmxdata esx: Fix regression in absolute file name handling 2011-05-26 23:32:44 +02:00
.gitignore Add a test case for certificate validation 2011-07-22 15:18:32 +01:00
.valgrind.supp tests: suppress more valgrind situations 2011-05-03 08:03:39 -06:00
capabilityschematest
commandhelper.c build: rename files.h to virfile.h 2011-07-21 10:34:51 -06:00
commandtest.c Fix command test wrt gnutls initialize & fix debugging 2011-08-25 12:05:54 +01:00
conftest.c tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
cpuset
cputest.c maint: simplify lots of libxml2 clients 2011-08-19 09:13:55 -06:00
daemon-conf
define-dev-segfault Add domain type checking 2011-07-11 19:38:51 +02:00
domainschematest
domainsnapshotschematest
esxutilstest.c tests: Use EXIT_AM_SKIP instead of 77 directly 2011-07-09 10:14:38 +02:00
eventtest.c tests: simplify common setup 2011-04-29 10:21:20 -06:00
hashdata.h tests: More unit tests for internal hash APIs 2011-04-27 15:32:30 +02:00
hashtest.c hash: fix memory leak regression 2011-04-29 14:26:40 -06:00
int-overflow tests: Don't use bash if we don't have to 2011-07-29 17:17:21 +02:00
interfaceschematest
interfacexml2xmltest.c tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
jsontest.c Add test case for parsing JSON docs 2011-06-30 18:04:02 +01:00
libvirtd-fail
libvirtd-pool
Makefile.am Prevent crash from dlclose() of libvirt.so 2011-09-16 15:51:31 -06:00
networkschematest
networkxml2argvtest.c network: Fix dnsmasq hostsfile creation logic and related tests 2011-06-29 01:59:34 +02:00
networkxml2xmltest.c bandwidth: Add test cases for network 2011-07-25 13:50:06 +08:00
nodedevschematest
nodedevxml2xmltest.c tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
nodeinfotest.c tests: Unify style of test skipping code 2011-07-29 12:12:58 +02:00
nwfilterschematest
nwfilterxml2xmltest.c tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
object-locking.ml maint: typo fixes 2011-06-24 08:01:10 -06:00
oomtrace.pl maint: mark more perl scripts executable 2011-05-16 10:12:21 -06:00
openvzutilstest.c openvz: Add simple test for openvzReadNetworkConf 2011-06-01 11:58:15 +02:00
openvzutilstest.conf openvz: Add simple test for openvzReadNetworkConf 2011-06-01 11:58:15 +02:00
pkix_asn1_tab.c Add a test case for certificate validation 2011-07-22 15:18:32 +01:00
qemuargv2xmltest.c Add unsafe cache mode support for disk driver 2011-09-23 08:29:57 -06:00
qemuhelptest.c qemu: add ability to set PCI device "rombar" on or off 2011-09-27 11:23:28 -04:00
qemuxml2argvtest.c Add unsafe cache mode support for disk driver 2011-09-23 08:29:57 -06:00
qemuxml2xmltest.c Add "redirdev" redirection device 2011-09-02 23:39:03 +08:00
qparamtest.c tests: simplify common setup 2011-04-29 10:21:20 -06:00
read-bufsiz
read-non-seekable
reconnect.c tests: Improve output of tests that decide to skip at runtime 2011-07-09 15:47:57 +02:00
schematestutils.sh
seclabeltest.c
sexpr2xmltest.c Do not drop kernel cmdline for xen pv domains 2011-07-11 09:11:15 -06:00
shunloadhelper.c Prevent crash from dlclose() of libvirt.so 2011-09-16 15:51:31 -06:00
shunloadtest.c Prevent crash from dlclose() of libvirt.so 2011-09-16 15:51:31 -06:00
sockettest.c tests: simplify common setup 2011-04-29 10:21:20 -06:00
ssh.c Introduce a generic object for using network sockets 2011-06-24 11:48:18 +01:00
start
statstest.c Skip some xen tests if xend is not running 2011-07-07 17:23:09 -06:00
storagepoolschematest
storagepoolxml2xmltest.c tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
storagevolschematest
storagevolxml2xmltest.c tests: Lower stack usage below 4096 bytes 2011-04-30 19:59:52 +02:00
test_conf.sh
test-lib.sh tests: simplify formatting 2011-07-11 09:21:37 -06:00
testutils.c logging: Do not log timestamp through syslog 2011-09-29 13:42:34 +02:00
testutils.h Provide a simple object for encoding/decoding RPC messages 2011-06-24 11:48:14 +01:00
testutilsqemu.c
testutilsqemu.h
testutilsxen.c
testutilsxen.h
undefine virsh: properly interleave shared stdout and stderr 2011-08-19 09:22:22 -06:00
utiltest.c build: avoid 'make syntax-check' failure 2011-07-01 16:46:20 -06:00
vcpupin
virbuftest.c maint: rename virBufferVSprintf to virBufferAsprintf 2011-05-05 13:47:40 -06:00
virnetmessagetest.c tests: Fix memory leak in virnetmessagetest 2011-06-29 10:47:54 +08:00
virnetsockettest.c Support changing UNIX socket owner in virNetSocketNewListenUNIX 2011-08-15 15:21:31 +02:00
virnettlscontexttest.c tests: avoid memory leak on testTLSSessionInit 2011-09-08 11:03:34 +01:00
virsh-all
virsh-optparse virsh: fix regression in argv parsing 2011-09-22 13:28:18 +08:00
virsh-schedinfo
virsh-synopsis
virshtest.c tests: Unify style of test skipping code 2011-07-29 12:12:58 +02:00
virt-aa-helper-test fix AppArmor driver for pipe character devices 2011-09-28 15:43:39 +08:00
vmx2xmltest.c tests: Use EXIT_AM_SKIP instead of 77 directly 2011-07-09 10:14:38 +02:00
xencapstest.c build: rename files.h to virfile.h 2011-07-21 10:34:51 -06:00
xmconfigtest.c Add domain type checking 2011-07-11 19:38:51 +02:00
xml2sexprtest.c Add domain type checking 2011-07-11 19:38:51 +02:00
xml2vmxtest.c Rename virDomainControllerModel to virDomainControllerModelSCSI 2011-09-02 23:22:56 +08:00