11cf4323eSThomas Huth /* 21cf4323eSThomas Huth * libqos malloc support for SPAPR 31cf4323eSThomas Huth * 41cf4323eSThomas Huth * This work is licensed under the terms of the GNU GPL, version 2 or later. 51cf4323eSThomas Huth * See the COPYING file in the top-level directory. 61cf4323eSThomas Huth */ 71cf4323eSThomas Huth 81cf4323eSThomas Huth #include "qemu/osdep.h" 9*a2ce7dbdSPaolo Bonzini #include "malloc-spapr.h" 101cf4323eSThomas Huth 111cf4323eSThomas Huth #include "qemu-common.h" 121cf4323eSThomas Huth 131cf4323eSThomas Huth #define PAGE_SIZE 4096 141cf4323eSThomas Huth 151cf4323eSThomas Huth /* Memory must be a multiple of 256 MB, 161cf4323eSThomas Huth * so we have at least 256MB 171cf4323eSThomas Huth */ 181cf4323eSThomas Huth #define SPAPR_MIN_SIZE 0x10000000 191cf4323eSThomas Huth 201cf4323eSThomas Huth void spapr_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags) 211cf4323eSThomas Huth { 221cf4323eSThomas Huth alloc_init(s, flags, 1 << 20, SPAPR_MIN_SIZE, PAGE_SIZE); 231cf4323eSThomas Huth } 24