diff options
-rw-r--r-- | arch_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch_init.c b/arch_init.c index b75a4c5..83dcc53 100644 --- a/arch_init.c +++ b/arch_init.c @@ -840,7 +840,8 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) memset(host, ch, TARGET_PAGE_SIZE); #ifndef _WIN32 if (ch == 0 && - (!kvm_enabled() || kvm_has_sync_mmu())) { + (!kvm_enabled() || kvm_has_sync_mmu()) && + getpagesize() <= TARGET_PAGE_SIZE) { qemu_madvise(host, TARGET_PAGE_SIZE, QEMU_MADV_DONTNEED); } #endif |