Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Bin Wu
On 2015/4/3 0:26, Fam Zheng wrote: > On Thu, 04/02 17:21, Paolo Bonzini wrote: >> >> >> On 02/04/2015 17:16, Fam Zheng wrote: > After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > the zero size ultimately is used to compute virtqueue_push's len > argument. The

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Wen Congyang
On 04/03/2015 12:26 AM, Fam Zheng wrote: > On Thu, 04/02 17:21, Paolo Bonzini wrote: >> >> >> On 02/04/2015 17:16, Fam Zheng wrote: > After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > the zero size ultimately is used to compute virtqueue_push's len > argument

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 18:26, Fam Zheng wrote: > There is another problem with your patch - read_size is not initialized in > non-RW paths like scsi and flush. Right, but... > I think the optimization for write is a separate thing, though. Shouldn't > below > patch already fix the migration issue? ...

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Fam Zheng
On Thu, 04/02 17:21, Paolo Bonzini wrote: > > > On 02/04/2015 17:16, Fam Zheng wrote: > > >> After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > > >> the zero size ultimately is used to compute virtqueue_push's len > > >> argument. Therefore, reads from virtio-blk de

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 17:16, Fam Zheng wrote: > >> After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > >> the zero size ultimately is used to compute virtqueue_push's len > >> argument. Therefore, reads from virtio-blk devices did not > >> migrate their results correctl

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Fam Zheng
On Thu, 04/02 16:51, Paolo Bonzini wrote: > > > On 02/04/2015 16:39, Fam Zheng wrote: > > On Thu, 04/02 15:37, Paolo Bonzini wrote: > >> After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > >> the zero size ultimately is used to compute virtqueue_push's len > >> argument. Therefore,

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Paolo Bonzini
On 02/04/2015 16:39, Fam Zheng wrote: > On Thu, 04/02 15:37, Paolo Bonzini wrote: >> After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and >> the zero size ultimately is used to compute virtqueue_push's len >> argument. Therefore, reads from virtio-blk devices did not >> migrate their

Re: [Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Fam Zheng
On Thu, 04/02 15:37, Paolo Bonzini wrote: > After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and > the zero size ultimately is used to compute virtqueue_push's len > argument. Therefore, reads from virtio-blk devices did not > migrate their results correctly. (Writes were okay). Can't

[Qemu-devel] [PATCH] virtio-blk: correctly dirty guest memory

2015-04-02 Thread Paolo Bonzini
After qemu_iovec_destroy, the QEMUIOVector's size is zeroed and the zero size ultimately is used to compute virtqueue_push's len argument. Therefore, reads from virtio-blk devices did not migrate their results correctly. (Writes were okay). Save the size in submit_requests, and use it when the r