mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
* src/xen_internal.c: one of the fix for system with page size != 4k
was missing Daniel
This commit is contained in:
parent
321c24bb00
commit
5533a01af3
@ -1,3 +1,8 @@
|
||||
Thu Oct 12 17:31:13 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xen_internal.c: one of the fix for system with page size != 4k
|
||||
was missing
|
||||
|
||||
Thu Oct 12 13:37:24 CEST 2006 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/xen_internal.c: applied patch from Philippe Berthault
|
||||
|
@ -1466,6 +1466,12 @@ xenHypervisorGetDomMaxMemory(virConnectPtr conn, int id)
|
||||
if ((conn == NULL) || (conn->handle < 0))
|
||||
return (0);
|
||||
|
||||
if (kb_per_pages == 0) {
|
||||
kb_per_pages = sysconf(_SC_PAGESIZE) / 1024;
|
||||
if (kb_per_pages <= 0)
|
||||
kb_per_pages = 4;
|
||||
}
|
||||
|
||||
XEN_GETDOMAININFO_CLEAR(dominfo);
|
||||
|
||||
ret = virXen_getdomaininfo(conn->handle, id, &dominfo);
|
||||
@ -1473,7 +1479,7 @@ xenHypervisorGetDomMaxMemory(virConnectPtr conn, int id)
|
||||
if ((ret < 0) || (XEN_GETDOMAININFO_DOMAIN(dominfo) != id))
|
||||
return (0);
|
||||
|
||||
return((unsigned long) XEN_GETDOMAININFO_MAX_PAGES(dominfo) * 4);
|
||||
return((unsigned long) XEN_GETDOMAININFO_MAX_PAGES(dominfo) * kb_per_pages);
|
||||
}
|
||||
|
||||
#ifndef PROXY
|
||||
|
Loading…
x
Reference in New Issue
Block a user