• L
    qemu: support event_idx parameter for virtio disk and net devices · 73c0a148
    Laine Stump 提交于
    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.
    73c0a148
libvirt_private.syms 24.9 KB