diff --git a/ChangeLog b/ChangeLog index 77f6cfdeb9..9a339538a4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Mon Jan 19 19:10:08 CET 2009 Daniel Veillard + + * 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 * configure.in: add a --with-rhel5-api configure option diff --git a/src/xend_internal.c b/src/xend_internal.c index 29b27806cc..e0c61e8761 100644 --- a/src/xend_internal.c +++ b/src/xend_internal.c @@ -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) diff --git a/src/xm_internal.c b/src/xm_internal.c index 6ea26087cf..308c766807 100644 --- a/src/xm_internal.c +++ b/src/xm_internal.c @@ -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)