migration: Move temp page setup and cleanup into separate functions
commit476ebf77fe8909ded10046edf26685bc28438162
authorPeter Xu <peterx@redhat.com>
Wed, 19 Jan 2022 08:09:20 +0000 (19 16:09 +0800)
committerJuan Quintela <quintela@redhat.com>
Fri, 28 Jan 2022 14:38:23 +0000 (28 15:38 +0100)
tree482dbb9f88b56962ad22f1407f533cf4655c4d11
parentcfd66f30fb0f735df06ff4220e5000290a43dad3
migration: Move temp page setup and cleanup into separate functions

Temp pages will need to grow if we want to have multiple channels for postcopy,
because each channel will need its own temp page to cache huge page data.

Before doing that, cleanup the related code.  No functional change intended.

Since at it, touch up the errno handling a little bit on the setup side.

Signed-off-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
migration/postcopy-ram.c