On 23/03/2016 22:32, Dominik Dingel wrote: > - page_size = qemu_fd_getpagesize(fd); > - block->mr->align = page_size; > + alignment = MAX(qemu_fd_getpagesize(fd), QEMU_VMALLOC_ALIGN); > + block->mr->align = alignment; > > - if (memory < page_size) { > + if (memory < alignment) { > error_setg(errp, "memory size 0x" RAM_ADDR_FMT " must be equal to " > - "or larger than page size 0x%" PRIx64, > - memory, page_size); > + "or larger than needed alignment 0x%" PRIx64, > + memory, alignment); > goto error; > }
Why is this part necessary? On x86 you can have 1 megabyte of RAM, but QEMU_VMALLOC_ALIGN is 2MB. Paolo > - memory = ROUND_UP(memory, page_size); > + memory = ROUND_UP(memory, alignment); >