Use statfs to determine size of huge pages
commit1cd6801cade814ad7ed12c2d75cf82b9d6c9e0c5
authorJoerg Roedel <joerg.roedel@amd.com>
Fri, 27 Mar 2009 14:34:38 +0000 (27 15:34 +0100)
committerMark McLoughlin <markmc@redhat.com>
Fri, 11 Sep 2009 10:38:03 +0000 (11 11:38 +0100)
treee188b76b6faced667b0dbc7188d17d139d42ab02
parent8d36ed3138b8d62cfcf3fdc20edfdf28931f425f
Use statfs to determine size of huge pages

The current method of finding out the size of huge pages does not work
reliably anymore. Current Linux supports more than one huge page size
but /proc/meminfo only show one of the supported sizes.
To find out the real page size used can be found by calling statfs. This
patch changes qemu to use statfs instead of parsing /proc/meminfo.

(cherry picked from commit f1ac0931a1aeadab2569b7001ec35250e695d94f)

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Fedora-patch: qemu-use-statfs-to-determine-huge-page-size.patch
sysemu.h
vl.c