aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exec.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/exec.c b/exec.c
index e63c5a1bd4..6d7f600c0c 100644
--- a/exec.c
+++ b/exec.c
@@ -1254,7 +1254,12 @@ static void *file_ram_alloc(RAMBlock *block,
}
block->page_size = qemu_fd_getpagesize(fd);
- block->mr->align = MAX(block->page_size, QEMU_VMALLOC_ALIGN);
+ block->mr->align = block->page_size;
+#if defined(__s390x__)
+ if (kvm_enabled()) {
+ block->mr->align = MAX(block->mr->align, QEMU_VMALLOC_ALIGN);
+ }
+#endif
if (memory < block->page_size) {
error_setg(errp, "memory size 0x" RAM_ADDR_FMT " must be equal to "