On Fri, Nov 27, 2009 at 07:00:47PM +0100, Jiri Denemark wrote: > Xen HVM guests with PV drivers end up with two network interfaces for > each configured interface. One of them being emulated by qemu and the > other one paravirtual. As this might not be desirable, the attached > patch provides a way for users to specify that only paravirtual network > interface should be presented to the guest. > > The configuration was inspired by qemu/kvm driver, for which users can > specify model='virtio' to use paravirtual network interface. > > The patch adds support for model='netfront' which results in > type=netfront instead of type=ioemu (or nothing for newer xen versions) > in guests native configuration. Xen's qemu ignores interfaces with > type != ioemu and only paravirtual network device will be seen in the > guest. > > Four possible configuration scenarios follow: > > - no model specified in domain's XML > - libvirt will behave like before this change; it will set > type=ioemu for HVM guests on xen host which is not newer than > XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU > - covered by existing tests > > - PV guest, any model > - no functional change, model is passed as is (and ignored by the > hypervisor) > - covered by existing tests (e.g., *-net-e1000.*) > > - HVM guest, model=netfront > - type is set to "netfront", model is not specified > - covered by new *-net-netfront.* tests > > - HVM guest, model != netfront > - type is set to "ioemu", model is passed as is > - covered by new *-net-ioemu.* tests > > The fourth scenario feels like a regression for xen newer than > XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU as users who had a model specified > in their guest's configuration won't see a paravirtual interface in > their guests any more. On the other hand, the reason for specifying a > model is most likely the fact that they want to use such model which > implies emulated interface. Users of older xen won't be affected at all > as their xen provides paravirtual interface regardless of the type used. > > In previous version of this patch, I used "xenpv" instead of "netfront" > as it looked more like kvm/qemu's virtio. However, you can find several > tips how to force PV network interface for HVM guest by using > type="netfront" so I changed it to conform with those tips. It also > matches guest's driver name used for that device. > > Jiri Denemark (2): > Support for interface model='netfront' > Tests for interface type/model configuration Thanks for the thorough explanations, I pushed both patches ! Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@xxxxxxxxxxxx | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/ -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list