2008-12-03 02:19:09 +01:00
|
|
|
Index: libvirt-0.4.6/src/xen_unified.c
|
2008-10-08 18:23:52 +02:00
|
|
|
===================================================================
|
2008-12-03 02:19:09 +01:00
|
|
|
--- libvirt-0.4.6.orig/src/xen_unified.c
|
|
|
|
+++ libvirt-0.4.6/src/xen_unified.c
|
|
|
|
@@ -799,8 +799,15 @@ xenUnifiedDomainSetMaxMemory (virDomainP
|
|
|
|
GET_PRIVATE(dom->conn);
|
|
|
|
int i;
|
|
|
|
|
|
|
|
+ /* Prefer xend for setting max memory */
|
|
|
|
+ if (priv->opened[XEN_UNIFIED_XEND_OFFSET]) {
|
|
|
|
+ if (xenDaemonDomainSetMaxMemory (dom, memory) == 0)
|
|
|
|
+ return 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
for (i = 0; i < XEN_UNIFIED_NR_DRIVERS; ++i)
|
|
|
|
- if (priv->opened[i] &&
|
|
|
|
+ if (i != XEN_UNIFIED_XEND_OFFSET &&
|
|
|
|
+ priv->opened[i] &&
|
|
|
|
drivers[i]->domainSetMaxMemory &&
|
|
|
|
drivers[i]->domainSetMaxMemory (dom, memory) == 0)
|
|
|
|
return 0;
|