]> git.ipfire.org Git - thirdparty/libvirt.git/commit
Add XML config switch to enable/disable vhost-net support
authorLaine Stump <laine@laine.org>
Wed, 12 Jan 2011 04:18:49 +0000 (23:18 -0500)
committerLaine Stump <laine@laine.org>
Fri, 14 Jan 2011 19:46:21 +0000 (14:46 -0500)
commit175077fd707db6ad87d6e2a079e82bc290ac2421
treecd4e49e0e7cbbb681b60f6342ecc507179dd0228
parent9d73efdbe3ea61a13a11fdc24a2cb530eaa0b66f
Add XML config switch to enable/disable vhost-net support

This patch is in response to

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

The existing libvirt support for the vhost-net backend to the virtio
network driver happens automatically - if the vhost-net device is
available, it is always enabled, otherwise the standard userland
virtio backend is used.

This patch makes it possible to force whether or not vhost-net is used
with a bit of XML. Adding a <driver> element to the interface XML, eg:

     <interface type="network">
       <model type="virtio"/>
       <driver name="vhost"/>

will force use of vhost-net (if it's not available, the domain will
fail to start). if driver name="qemu", vhost-net will not be used even
if it is available.

If there is no <driver name='xxx'/> in the config, libvirt will revert
to the pre-existing automatic behavior - use vhost-net if it's
available, and userland backend if vhost-net isn't available.
docs/schemas/domain.rng
src/conf/domain_conf.c
src/conf/domain_conf.h
src/qemu/qemu_command.c
src/qemu/qemu_command.h