Prasad,

On Tue, Oct 29, 2024 at 08:39:05PM +0530, Prasad Pandit wrote:
> @@ -1612,6 +1615,10 @@ postcopy_preempt_send_channel_done(MigrationState *s,
>       * postcopy_qemufile_src to know whether it failed or not.
>       */
>      qemu_sem_post(&s->postcopy_qemufile_src_sem);
> +
> +    /* Send magic value to identify postcopy channel on the destination */
> +    uint32_t magic = cpu_to_be32(POSTCOPY_MAGIC);
> +    qio_channel_write_all(ioc, (char *)&magic, sizeof(magic), NULL);

As we discussed internally, we can't do this unconditionally.  We at least
some compat properties.  Or we need to see whether Fabiano's handshake can
simplify this, because the handshake will also re-design the channel
establishment protocol.

Thanks,

>  }
>  
>  static void
> diff --git a/migration/postcopy-ram.h b/migration/postcopy-ram.h
> index a6df1b2811..49e2982558 100644
> --- a/migration/postcopy-ram.h
> +++ b/migration/postcopy-ram.h
> @@ -15,6 +15,9 @@
>  
>  #include "qapi/qapi-types-migration.h"
>  
> +/* Magic value to identify postcopy channel on the destination */
> +#define POSTCOPY_MAGIC  0x55667788U
> +
>  /* Return true if the host supports everything we need to do postcopy-ram */
>  bool postcopy_ram_supported_by_host(MigrationIncomingState *mis,
>                                      Error **errp);
> -- 
> 2.47.0
> 

-- 
Peter Xu


Reply via email to