"Dr. David Alan Gilbert (git)" <dgilb...@redhat.com> wrote: > From: "Dr. David Alan Gilbert" <dgilb...@redhat.com> > > Provide a check to see if the OS we're running on has all the bits > needed for postcopy. > > Creates postcopy-ram.c which will get most of the other helpers we need. > > Signed-off-by: Dr. David Alan Gilbert <dgilb...@redhat.com>
Reviewed-by: Juan Quintela <quint...@redhat.com> I am guessing that test is ok, but we are doing the test each time that we change the function. We always end calling that kind of functions in several places. Shouldn't be good to rename the function to __postcopy_ram_supported_by_host() and do a toplevel function that is: bool postcopy_ram_supported_by_host(void) { static bool first_time = true; static supported = false; if (firt_time) { first_time = false; supported = __postcopy_ram_supported_by_host() } return supported; } Notice that I don't know how slow the mmap + usefault thing is, but I guess that the values would not change while running, no? It has a review-by because I don't see anything wrong with it.