blob: d90ed3c51d7dd43af65cc1b1bfce4d9bbab02f80 [file] [log] [blame]
Laurent Vivier8d6ef7c2016-09-13 14:52:44 +02001/*
2 * libqos malloc support for SPAPR
3 *
4 * This work is licensed under the terms of the GNU GPL, version 2 or later.
5 * See the COPYING file in the top-level directory.
6 */
7
8#include "qemu/osdep.h"
Paolo Bonzinia2ce7db2020-08-04 20:00:40 +02009#include "malloc-spapr.h"
Laurent Vivier8d6ef7c2016-09-13 14:52:44 +020010
Jiaxun Yangd2c4f382021-01-18 14:38:05 +080011#define SPAPR_PAGE_SIZE 4096
Laurent Vivier8d6ef7c2016-09-13 14:52:44 +020012
13/* Memory must be a multiple of 256 MB,
14 * so we have at least 256MB
15 */
16#define SPAPR_MIN_SIZE 0x10000000
17
Paolo Bonzinieb5937b2018-11-29 12:37:04 +010018void spapr_alloc_init(QGuestAllocator *s, QTestState *qts, QAllocOpts flags)
Laurent Vivier8d6ef7c2016-09-13 14:52:44 +020019{
Jiaxun Yangd2c4f382021-01-18 14:38:05 +080020 alloc_init(s, flags, 1 << 20, SPAPR_MIN_SIZE, SPAPR_PAGE_SIZE);
Laurent Vivier8d6ef7c2016-09-13 14:52:44 +020021}