[libvirt] [PATCH 4/7] Fix HVM network device configuration for RHEL-5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Omit (type ioemu) on RHEL-5, because it breaks PV drivers on HVM
there.

Signed-off-by: Markus Armbruster <armbru@xxxxxxxxxx>
---
 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

--
Libvir-list mailing list
Libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]