summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaine Stump <laine@laine.org>2011-08-13 02:32:45 -0400
committerLaine Stump <laine@laine.org>2011-08-15 09:35:42 -0400
commit73c0a148af5fc6b782f757fae4b7f94f9a514147 (patch)
tree470029ef270b85430d2bed61d3443483584f379e /tests/qemuxml2xmltest.c
parentqemu: error message should show uri instead of (null) (diff)
downloadlibvirt-73c0a148af5fc6b782f757fae4b7f94f9a514147.tar.gz
libvirt-73c0a148af5fc6b782f757fae4b7f94f9a514147.tar.bz2
libvirt-73c0a148af5fc6b782f757fae4b7f94f9a514147.zip
qemu: support event_idx parameter for virtio disk and net devices
In some versions of qemu, both virtio-blk-pci and virtio-net-pci devices can have an event_idx setting that determines some details of event processing. When it is enabled, it "reduces the number of interrupts and exits for the guest". qemu will automatically enable this feature when it is available, but there may be cases where this new feature could actually make performance worse (NB: no such case has been found so far). As a safety switch in case such a situation is encountered in the field, this patch adds a new attribute "event_idx" to the <driver> element of both disk and interface devices. event_idx can be set to "on" (to force event_idx on in case qemu has it disabled by default) or "off" (for force event_idx off). In the case that event_idx support isn't present in qemu, the attribute is ignored (this on the advice of the qemu developer). docs/formatdomain.html.in: document the new flag (marking it as "don't mess with this!" docs/schemas/domain.rng: add event_idx in appropriate places src/conf/domain_conf.[ch]: add event_idx to parser and formatter src/libvirt_private.syms: export virDomainVirtioEventIdx(From|To)String src/qemu/qemu_capabilities.[ch]: detect and report event_idx in disk/net src/qemu/qemu_command.c: add event_idx parameter to qemu commandline when appropriate. tests/qemuxml2argvdata/qemuxml2argv-event_idx.args, tests/qemuxml2argvdata/qemuxml2argv-event_idx.xml, tests/qemuxml2argvtest.c, tests/qemuxml2xmltest.c: test cases for event_idx.
Diffstat (limited to 'tests/qemuxml2xmltest.c')
-rw-r--r--tests/qemuxml2xmltest.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index c74f96c7b..4e109d529 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -187,6 +187,7 @@ mymain(void)
DO_TEST("smp");
DO_TEST("lease");
+ DO_TEST("event_idx");
/* These tests generate different XML */
DO_TEST_DIFFERENT("balloon-device-auto");