* src/xend_internal.c src/xm_internal.c: fix fully virt network

device configuration for Xen on RHEL-5, patch by Markus Armbruster
daniel
This commit is contained in:
Daniel Veillard 2009-01-19 18:12:00 +00:00
parent 4fbbbbd336
commit e676a699e8
3 changed files with 19 additions and 2 deletions

View File

@ -1,3 +1,8 @@
Mon Jan 19 19:10:08 CET 2009 Daniel Veillard <veillard@redhat.com>
* src/xend_internal.c src/xm_internal.c: fix fully virt network
device configuration for Xen on RHEL-5, patch by Markus Armbruster
Mon Jan 19 18:31:56 CET 2009 Daniel Veillard <veillard@redhat.com>
* configure.in: add a --with-rhel5-api configure option

View File

@ -59,6 +59,12 @@
#endif /* PROXY */
#ifdef WITH_RHEL5_API
#define XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU 0
#else
#define XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU 3
#endif
/**
* xend_connection_type:
*
@ -5160,7 +5166,7 @@ xenDaemonFormatSxprNet(virConnectPtr conn,
* apparently (type ioemu) breaks paravirt drivers on HVM so skip this
* from Xen 3.1.0
*/
if ((hvm) && (xendConfigVersion < 4))
if (hvm && xendConfigVersion <= XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU)
virBufferAddLit(buf, "(type ioemu)");
if (!isAttach)

View File

@ -48,6 +48,12 @@
#include "logging.h"
#ifdef WITH_RHEL5_API
#define XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU 0
#else
#define XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU 3
#endif
/* The true Xen limit varies but so far is always way
less than 1024, which is the Linux kernel limit according
to sched.h, so we'll match that for now */
@ -1837,7 +1843,7 @@ static int xenXMDomainConfigFormatNet(virConnectPtr conn,
goto cleanup;
}
if (hvm && priv->xendConfigVersion < 4)
if (hvm && priv->xendConfigVersion <= XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU)
virBufferAddLit(&buf, ",type=ioemu");
if (net->model)