From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49597) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr7dm-00079u-PJ for qemu-devel@nongnu.org; Tue, 27 Oct 2015 13:02:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zr7di-0000gR-IN for qemu-devel@nongnu.org; Tue, 27 Oct 2015 13:02:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zr7di-0000gL-DI for qemu-devel@nongnu.org; Tue, 27 Oct 2015 13:02:26 -0400 Date: Tue, 27 Oct 2015 17:02:23 +0000 From: Stefan Hajnoczi Message-ID: <20151027170223.GC9986@stefanha-x1.localdomain> References: <1445859777-2982-1-git-send-email-den@openvz.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1445859777-2982-1-git-send-email-den@openvz.org> Subject: Re: [Qemu-devel] [PATCH 1/1] virtio: sync the dataplane vring state to the virtqueue before virtio_save List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Denis V. Lunev" Cc: Kevin Wolf , Paolo Bonzini , "Michael S. Tsirkin" , qemu-devel@nongnu.org, Pavel Butsykin On Mon, Oct 26, 2015 at 02:42:57PM +0300, Denis V. Lunev wrote: > From: Pavel Butsykin > > When creating snapshot with the dataplane enabled, the snapshot file gets > not the actual state of virtqueue, because the current state is stored in > VirtIOBlockDataPlane. Therefore, before saving snapshot need to sync > the dataplane vring state to the virtqueue. The dataplane will resume its > work at the next notify virtqueue. > > When snapshot loads with loadvm we get a message: > VQ 0 size 0x80 Guest index 0x15f5 inconsistent with Host index 0x0: > delta 0x15f5 > error while loading state for instance 0x0 of device > '0000:00:08.0/virtio-blk' > Error -1 while loading VM state > > to reproduce the error I used the following hmp commands: > savevm snap1 > loadvm snap1 > > qemu parameters: > --enable-kvm -smp 4 -m 1024 -drive file=/var/lib/libvirt/images/centos6.4.qcow2,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x8,drive=drive-virtio-disk0,id=virtio-disk0 -set device.virtio-disk0.x-data-plane=on > > Signed-off-by: Pavel Butsykin > Signed-off-by: Denis V. Lunev > CC: Stefan Hajnoczi > CC: "Michael S. Tsirkin" > CC: Kevin Wolf > CC: Paolo Bonzini > --- > hw/block/virtio-blk.c | 5 +++++ > hw/scsi/virtio-scsi.c | 5 +++++ > 2 files changed, 10 insertions(+) Thanks, applied to my block tree: https://github.com/stefanha/qemu/commits/block Stefan