Omit (type ioemu) on RHEL-5, because it breaks PV drivers on HVM
there.
Signed-off-by: Markus Armbruster <armbru(a)redhat.com>
---
src/xend_internal.c | 8 +++++++-
src/xm_internal.c | 8 +++++++-
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/xend_internal.c b/src/xend_internal.c
index 39a92ff..b502508 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:
*
@@ -5155,7 +5161,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 7cbfc7e..36334c4 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)
--
1.5.4.3