diff options
author | Stefan Agner <stefan@agner.ch> | 2016-08-08 00:01:44 -0700 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2016-08-09 10:20:59 +0100 |
commit | 0093df80d754e1a05b016e5a4ccd4b51a00c562c (patch) | |
tree | c05630d5e16d80df6f0df0344b6c03108e31651c | |
parent | c1c33b44b75cd61e69193d56161fb290fe7b732a (diff) | |
download | kvmtool-0093df80d754e1a05b016e5a4ccd4b51a00c562c.tar.gz |
kvmtool: ARM: madvise mergeable and hugepage separately
The madvise behavior is not a bit field and hence can not be or'ed.
Also madvise_behavior_valid checks the flag using a case statement
hence only one behavior is supposed to be supplied. Call madvise
twice, once for MERGEABLE and once for HUGEPAGE.
Acked-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | arm/kvm.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -80,7 +80,10 @@ void kvm__arch_init(struct kvm *kvm, const char *hugetlbfs_path, u64 ram_size) SZ_2M); madvise(kvm->arch.ram_alloc_start, kvm->arch.ram_alloc_size, - MADV_MERGEABLE | MADV_HUGEPAGE); + MADV_MERGEABLE); + + madvise(kvm->arch.ram_alloc_start, kvm->arch.ram_alloc_size, + MADV_HUGEPAGE); /* Create the virtual GIC. */ if (gic__create(kvm, kvm->cfg.arch.irqchip)) |