dm: add hugetlb memory management support

Type '-T' in DM cmdline to enable hugetlb memory allocation.
It enabled 2 level of huge page:
Level 1: size 2M, path: /run/hugepage/acrn/huge_lv1/guid
Level 2: size 1G, path: /run/hugepage/acrn/huge_lv2/guid

NOTE:
before running, please make sure system already have enough hugepages
reserved under:
/sys/kernel/mm/hugepages/hugepages-xxxxkB/nr_hugepages

Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Xu, Anthony <anthony.xu@intel.com>
This commit is contained in:
Jason Chen CJ
2018-03-14 22:03:52 +08:00
committed by Jack Ren
parent ac5da17e52
commit 4cad694be2
6 changed files with 546 additions and 9 deletions

View File

@@ -39,9 +39,6 @@
#include "dm.h"
#include "smbiostbl.h"
#define MB (1024*1024)
#define GB (1024ULL*1024*1024)
#define SMBIOS_BASE 0xF1000
/* ACRN-DM_ACPI_BASE - SMBIOS_BASE) */