Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors

2018-03-27 Thread Xiao Guangrong
On 03/27/2018 07:17 PM, Peter Xu wrote: On Tue, Mar 27, 2018 at 03:42:32AM +0800, Xiao Guangrong wrote: [...] It'll be understandable to me if the problem is that the compress() API does not allow the input buffer to be changed during the whole period of the call. If that is a must, this pa

Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors

2018-03-27 Thread Peter Xu
On Tue, Mar 27, 2018 at 03:42:32AM +0800, Xiao Guangrong wrote: [...] > > It'll be understandable to me if the problem is that the compress() > > API does not allow the input buffer to be changed during the whole > > period of the call. If that is a must, this patch for sure helps. > > Yes, tha

Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors

2018-03-27 Thread Xiao Guangrong
On 03/27/2018 03:22 PM, Peter Xu wrote: On Thu, Mar 22, 2018 at 08:03:53PM +0800, Xiao Guangrong wrote: On 03/21/2018 06:00 PM, Peter Xu wrote: On Tue, Mar 13, 2018 at 03:57:34PM +0800, guangrong.x...@gmail.com wrote: From: Xiao Guangrong Currently the page being compressed is allowed to

Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors

2018-03-27 Thread Peter Xu
On Thu, Mar 22, 2018 at 08:03:53PM +0800, Xiao Guangrong wrote: > > > On 03/21/2018 06:00 PM, Peter Xu wrote: > > On Tue, Mar 13, 2018 at 03:57:34PM +0800, guangrong.x...@gmail.com wrote: > > > From: Xiao Guangrong > > > > > > Currently the page being compressed is allowed to be updated by > >

Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors

2018-03-22 Thread Xiao Guangrong
On 03/21/2018 06:00 PM, Peter Xu wrote: On Tue, Mar 13, 2018 at 03:57:34PM +0800, guangrong.x...@gmail.com wrote: From: Xiao Guangrong Currently the page being compressed is allowed to be updated by the VM on the source QEMU, correspondingly the destination QEMU just ignores the decompressio

Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors

2018-03-21 Thread Peter Xu
On Tue, Mar 13, 2018 at 03:57:34PM +0800, guangrong.x...@gmail.com wrote: > From: Xiao Guangrong > > Currently the page being compressed is allowed to be updated by > the VM on the source QEMU, correspondingly the destination QEMU > just ignores the decompression error. However, we completely mis

Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors

2018-03-16 Thread Xiao Guangrong
On 03/15/2018 07:29 PM, Dr. David Alan Gilbert wrote: @@ -1051,11 +1052,13 @@ static int do_compress_ram_page(QEMUFile *f, z_stream *stream, RAMBlock *block, { RAMState *rs = ram_state; int bytes_sent, blen; -uint8_t *p = block->host + (offset & TARGET_PAGE_MASK); +uint8

Re: [Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors

2018-03-15 Thread Dr. David Alan Gilbert
* guangrong.x...@gmail.com (guangrong.x...@gmail.com) wrote: > From: Xiao Guangrong > > Currently the page being compressed is allowed to be updated by > the VM on the source QEMU, correspondingly the destination QEMU > just ignores the decompression error. However, we completely miss > the chanc

[Qemu-devel] [PATCH 3/8] migration: support to detect compression and decompression errors

2018-03-13 Thread guangrong . xiao
From: Xiao Guangrong Currently the page being compressed is allowed to be updated by the VM on the source QEMU, correspondingly the destination QEMU just ignores the decompression error. However, we completely miss the chance to catch real errors, then the VM is corrupted silently To make the mi