]> xenbits.xensource.com Git - libvirt.git/commitdiff
* src/xend_internal.c src/xm_internal.c: fix fully virt network
authorDaniel Veillard <veillard@redhat.com>
Mon, 19 Jan 2009 18:12:00 +0000 (18:12 +0000)
committerDaniel Veillard <veillard@redhat.com>
Mon, 19 Jan 2009 18:12:00 +0000 (18:12 +0000)
  device configuration for Xen on RHEL-5, patch by Markus Armbruster
daniel

ChangeLog
src/xend_internal.c
src/xm_internal.c

index 77f6cfdeb973a63ab507e2e1183f9e753b5e7d5c..9a339538a4e6e61aba6acaf7ce4e174a350a513e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 29b27806cc7a65462207b535d48b15f9e5d38781..e0c61e8761957b283ec152193ed8eaa3c995a876 100644 (file)
 
 #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)
index 6ea26087cf662d6164250fbd80de3d606eb8a30d..308c76680795cc50a36e1a17ff16078c02cd0b78 100644 (file)
 #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)