diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2017-02-24 18:28:40 +0000 |
---|---|---|
committer | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2017-02-28 11:30:24 +0000 |
commit | 433bd0223c213a1f5033e9857d8829d249d3b480 (patch) | |
tree | c9264958333e4cbe16288a704e3cdca1e6e91441 /migration/postcopy-ram.c | |
parent | 4c011c37ecb37690b3c6463db78c71855694a911 (diff) |
postcopy: Allow hugepages
Allow huge pages in postcopy.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Message-Id: <20170224182844.32452-13-dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/postcopy-ram.c')
-rw-r--r-- | migration/postcopy-ram.c | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 03cbd6e697..6b30b43d51 100644 --- a/migration/postcopy-ram.c +++ b/migration/postcopy-ram.c @@ -85,24 +85,6 @@ static bool ufd_version_check(int ufd) } /* - * 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 * end. @@ -122,12 +104,6 @@ bool postcopy_ram_supported_by_host(void) 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__, @@ -139,6 +115,7 @@ bool postcopy_ram_supported_by_host(void) if (!ufd_version_check(ufd)) { goto out; } + /* TODO: Only allow huge pages if the kernel supports it */ /* * userfault and mlock don't go together; we'll put it back later if |