libvirt/src/xen
Jiri Denemark dddad4bcb4 Support for interface model='netfront'
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.

- src/xen/xend_internal.c: add netfront support for the xend backend
- src/xen/xm_internal.c: add netfront support for the XM serialization too
2009-12-04 16:55:59 +01:00
..
block_stats.c Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
block_stats.h Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
proxy_internal.c Fix logic in xenUnifiedNumOfDomains to match xenUnifiedListDomains 2009-11-12 11:53:54 +00:00
proxy_internal.h Fix logic in xenUnifiedNumOfDomains to match xenUnifiedListDomains 2009-11-12 11:53:54 +00:00
sexpr.c Various fixes following a code review 2009-11-10 17:48:12 +01:00
sexpr.h Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
xen_driver.c Add virConnectGetLibvirtVersion API 2009-11-12 10:53:26 -05:00
xen_driver.h Implmentation of new APIs to checking state/persistence of objects 2009-11-10 17:00:27 +00:00
xen_hypervisor.c Fix compilation of libvirt against xen-unstable 2009-11-15 09:40:36 +01:00
xen_hypervisor.h Filter out stale domains from xenstore listing 2009-11-12 11:53:54 +00:00
xen_inotify.c Implmentation of new APIs to checking state/persistence of objects 2009-11-10 17:00:27 +00:00
xen_inotify.h Implmentation of new APIs to checking state/persistence of objects 2009-11-10 17:00:27 +00:00
xend_internal.c Support for interface model='netfront' 2009-12-04 16:55:59 +01:00
xend_internal.h Fix logic in xenUnifiedNumOfDomains to match xenUnifiedListDomains 2009-11-12 11:53:54 +00:00
xm_internal.c Support for interface model='netfront' 2009-12-04 16:55:59 +01:00
xm_internal.h Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00
xs_internal.c Filter out stale domains from xenstore listing 2009-11-12 11:53:54 +00:00
xs_internal.h Move xen driver code into src/xen/ directory 2009-09-21 14:41:42 +01:00