"Dr. David Alan Gilbert" <dgilb...@redhat.com> wrote: > * Juan Quintela (quint...@redhat.com) wrote: >> This implements the zero page dection and handling. >> >> Signed-off-by: Juan Quintela <quint...@redhat.com> >> --- >> migration/multifd.c | 33 +++++++++++++++++++++++++++++++-- >> 1 file changed, 31 insertions(+), 2 deletions(-) >> >> diff --git a/migration/multifd.c b/migration/multifd.c >> index 2e4dffd6c6..5c1fc70ce3 100644 >> --- a/migration/multifd.c >> +++ b/migration/multifd.c >> @@ -11,6 +11,7 @@ >> */ >> >> #include "qemu/osdep.h" >> +#include "qemu/cutils.h" >> #include "qemu/rcu.h" >> #include "exec/target_page.h" >> #include "sysemu/sysemu.h" >> @@ -277,6 +278,12 @@ static void multifd_send_fill_packet(MultiFDSendParams >> *p) >> >> packet->offset[i] = cpu_to_be64(temp); >> } >> + for (i = 0; i < p->zero_num; i++) { >> + /* there are architectures where ram_addr_t is 32 bit */ >> + uint64_t temp = p->zero[i]; >> + >> + packet->offset[p->normal_num + i] = cpu_to_be64(temp); > > OK, so if I'm understanding correctly here, the packet->offset array > starts with the 'normals' and then the zeros? > If so that probably needs a comment somewhere.
Yeap. > Other than that, Thanks, Juan.