* Juan Quintela ([email protected]) wrote: > "Dr. David Alan Gilbert (git)" <[email protected]> wrote: > > From: "Dr. David Alan Gilbert" <[email protected]> > > > > The state of the postcopy process is managed via a series of messages; > > * Add wrappers and handlers for sending/receiving these messages > > * Add state variable that track the current state of postcopy > > > > Signed-off-by: Dr. David Alan Gilbert <[email protected]> > > Reviewed-by: Amit Shah <[email protected]> > > Reviewed-by: Juan Quintela <[email protected]> > > > > + tmp[0] = cpu_to_be64(getpagesize()); > > + tmp[1] = cpu_to_be64(1ul << qemu_target_page_bits()); > > we don't have a qemu_target_pagesize()? > > #fail
Well we didn't even have qemu_target_page_bits() until patch 1 - I could add pagesize as well if you prefer? > > + qemu_savevm_command_send(f, MIG_CMD_POSTCOPY_LISTEN, 0, NULL); > > Should we create a macro > > qemu_savevm_command_noargs_send(f, MIG_CMD_POSTCOPY_LISTEN); > > It is a "bit" clear, but saves a "whole" byte. Not convinced one way or > other :-p Doesn't seem worth it to me. > > + > > + case MIG_CMD_POSTCOPY_ADVISE: > > + tmp64a = qemu_get_be64(f); /* hps */ > > + tmp64b = qemu_get_be64(f); /* tps */ > > + return loadvm_postcopy_handle_advise(mis, tmp64a, tmp64b); > > In the rest of the commands, you read the arguments inside the > loadvm_postocpy_handle_*(), I think you should do the same here. Hmm; actually most of them I don't do it in the handle_ function, only the ones that were dynamically sized I do; however it is neater doing it that way so I'll change all the places in that switch to do it in the handle. Dave > > Later, Juan. -- Dr. David Alan Gilbert / [email protected] / Manchester, UK
