* src/xen_unified.c: use preferably xend method to update

the maximum memory of a xen guest (Jim Fehlig)
Daniel
This commit is contained in:
Daniel Veillard 2008-11-27 16:16:13 +00:00
parent 60c8b285a6
commit 431d40fa9c
2 changed files with 13 additions and 1 deletions

View File

@ -1,3 +1,8 @@
Thu Nov 27 17:15:10 CET 2008 Daniel Veillard <veillard@redhat.com>
* src/xen_unified.c: use preferably xend method to update
the maximum memory of a xen guest (Jim Fehlig)
Wed Nov 26 15:46:07 CET 2008 Daniel Veillard <veillard@redhat.com> Wed Nov 26 15:46:07 CET 2008 Daniel Veillard <veillard@redhat.com>
* libvirt.spec.in: cleanups and missing dep for hal * libvirt.spec.in: cleanups and missing dep for hal

View File

@ -819,8 +819,15 @@ xenUnifiedDomainSetMaxMemory (virDomainPtr dom, unsigned long memory)
GET_PRIVATE(dom->conn); GET_PRIVATE(dom->conn);
int i; 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) 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 &&
drivers[i]->domainSetMaxMemory (dom, memory) == 0) drivers[i]->domainSetMaxMemory (dom, memory) == 0)
return 0; return 0;