return true;
}
+/*
+ * Check for things that postcopy won't support; returns 0 if the block
+ * is fine.
+ */
+static int check_range(const char *block_name, void *host_addr,
+ ram_addr_t offset, ram_addr_t length, void *opaque)
+{
+ RAMBlock *rb = qemu_ram_block_by_name(block_name);
+
+ if (qemu_ram_pagesize(rb) > getpagesize()) {
+ error_report("Postcopy doesn't support large page sizes yet (%s)",
+ block_name);
+ return -E2BIG;
+ }
+
+ return 0;
+}
+
/*
* Note: This has the side effect of munlock'ing all of RAM, that's
* normally fine since if the postcopy succeeds it gets turned back on at the
goto out;
}
+ /* Check for anything about the RAMBlocks we don't support */
+ if (qemu_ram_foreach_block(check_range, NULL)) {
+ /* check_range will have printed its own error */
+ goto out;
+ }
+
ufd = syscall(__NR_userfaultfd, O_CLOEXEC);
if (ufd == -1) {
error_report("%s: userfaultfd not available: %s", __func__,