qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

migration/postcopy: mis->have_listen_thread check will never be touched

If mis->have_listen_thread is true, this means current PostcopyState
must be LISTENING or RUNNING. While the check at the beginning of the
function makes sure the state transaction happens when its previous
PostcopyState is ADVISE or DISCARD.

This means we would never touch this check.

Signed-off-by: Wei Yang <richardw.yang@linux.intel.com>
Message-Id: <20191006000249.29926-2-richardw.yang@linux.intel.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

authored by

Wei Yang and committed by
Dr. David Alan Gilbert
2a461c24 4991f309

-5
-5
migration/savevm.c
··· 1878 1878 return -1; 1879 1879 } 1880 1880 1881 - if (mis->have_listen_thread) { 1882 - error_report("CMD_POSTCOPY_RAM_LISTEN already has a listen thread"); 1883 - return -1; 1884 - } 1885 - 1886 1881 mis->have_listen_thread = true; 1887 1882 /* Start up the listening thread and wait for it to signal ready */ 1888 1883 qemu_sem_init(&mis->listen_thread_sem, 0);