diff options
author | Alexey Kardashevskiy | 2017-03-02 03:36:11 +0100 |
---|---|---|
committer | David Gibson | 2017-03-03 01:30:59 +0100 |
commit | 9c60766887c647df7193463f7a2075e8993b514c (patch) | |
tree | 8c6c4797388c2b03226e7e5871531646234d0f1f /include/qemu | |
parent | target/ppc: Add POWER9/ISAv3.00 to compat_table (diff) | |
download | qemu-9c60766887c647df7193463f7a2075e8993b514c.tar.gz qemu-9c60766887c647df7193463f7a2075e8993b514c.tar.xz qemu-9c60766887c647df7193463f7a2075e8993b514c.zip |
exec, kvm, target-ppc: Move getrampagesize() to common code
getrampagesize() returns the largest supported page size and mainly
used to know if huge pages are enabled.
However is implemented in target-ppc/kvm.c and not available
in TCG or other architectures.
This renames and moves gethugepagesize() to mmap-alloc.c where
fd-based analog of it is already implemented. This renames and moves
getrampagesize() to exec.c as it seems to be the common place for
helpers like this.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/mmap-alloc.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/qemu/mmap-alloc.h b/include/qemu/mmap-alloc.h index 933c024ac5..50385e3f81 100644 --- a/include/qemu/mmap-alloc.h +++ b/include/qemu/mmap-alloc.h @@ -5,6 +5,8 @@ size_t qemu_fd_getpagesize(int fd); +size_t qemu_mempath_getpagesize(const char *mem_path); + void *qemu_ram_mmap(int fd, size_t size, size_t align, bool shared); void qemu_ram_munmap(void *ptr, size_t size); |