Description of problem: libvirt reports wrong "memory size" Version-Release number of selected component (if applicable): Latest stable (0.10.1) How reproducible: Install latest alpinelinux stable (uclibc based distribution) including libvirt Exec: virsh nodeinfo Actual results: Memory size: 65536 KiB Expected results: Installed memory size is 4GB Additional info: on uclibc sysconf(_SC_PHYS_PAGES) returns -1 while _SC_PAGE_SIZE gives the correct value found in: gnulib/lib/physmem.c
This has been fixed in gnulib: commit 22756d58aa46c291f7fa1c63d61c7c0483622c4e Author: Natanael Copa <ncopa> AuthorDate: 2014-04-18 09:16:27 +0000 Commit: Pádraig Brady <P> CommitDate: 2014-04-19 12:34:49 +0100 physmem: use sysinfo if _SC_PHYS_PAGES unavailable * lib/physmem.c (physmem_total): Some systems like musl libc do not (yet) support _SC_PHYS_PAGES. Use the linux syscall sysinfo as fallback if _SC_PHYS_PAGES or _SC_PAGESIZE fails. (physmem_available): Likewise for _SC_AVPHYS_PAGES. Signed-off-by: Natanael Copa <ncopa> git describe: v0.1-119-g22756d5 Libvirt uses it since commit 45e134d6fcb63e9fa052b3490120d51040f7cec4 Author: Eric Blake <eblake> CommitDate: 2014-04-21 14:52:28 -0600 maint: update to latest gnulib Among other patches, Natanael Copa contributed a fix for pyshmem_available when using musl libc that directly affects libvirt. * .gnulib: Update to latest, in part for musl libc compat. Signed-off-by: Eric Blake <eblake> git describe: v1.2.3-142-g45e134d