Received: from eggs.gnu.org ([2001:4830:134:3::10]:33208) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf8zC-0008Np-Mp for qemu-devel@nongnu.org; Wed, 31 Aug 2016 13:07:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bf8z8-00014h-MT for qemu-devel@nongnu.org; Wed, 31 Aug 2016 13:07:38 -0400 Received: from mx1.parallels.com ([199.115.104.18]:32921) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bf8z8-0000rn-Fr for qemu-devel@nongnu.org; Wed, 31 Aug 2016 13:07:34 -0400 References: <1471265656-11227-1-git-send-email-stefanha@redhat.com> From: "Denis V. Lunev" Message-ID: Date: Wed, 31 Aug 2016 20:06:21 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 0/2] virtio: fix VirtQueue->inuse field List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , Roman Kagan Cc: Stefan Hajnoczi , qemu-devel , Cornelia Huck , Fam Zheng , "Michael S. Tsirkin" On 08/30/2016 10:54 PM, Stefan Hajnoczi wrote: > On Mon, Aug 22, 2016 at 10:00 AM, Denis V. Lunev > wrote: >> On 08/15/2016 08:54 AM, Stefan Hajnoczi wrote: >>> The VirtQueue->inuse field is not always updated correctly. These patches >>> fix >>> it. >>> >>> Originally this series was called "virtio-balloon: fix stats vq migration" >>> but >>> Ladi Prosek posted a nicer fix called "balloon: Fix failure of updating >>> guest >>> memory status". I dropped the virtio-balloon patches. >>> >>> Changes from previous series: >>> * Missing comma in error formatting [Fam] >>> * virtio_descard() -> virtio_discard() [Michael] >>> * Multi-line comment style [Cornelia] >>> >>> Stefan Hajnoczi (2): >>> virtio: recalculate vq->inuse after migration >>> virtio: decrement vq->inuse in virtqueue_discard() >>> >>> hw/virtio/virtio.c | 16 ++++++++++++++++ >>> 1 file changed, 16 insertions(+) >>> >> these patches break 'make check' with the following: >> >> GTESTER check-qtest-x86_64 >> Warning: path not on HugeTLBFS: /tmp/vhost-test-hRYeTb >> Warning: path not on HugeTLBFS: /tmp/vhost-test-hRYeTb >> Warning: path not on HugeTLBFS: /tmp/vhost-test-hRYeTb >> qemu-system-x86_64: VQ 1 size 0x100 < last_avail_idx 0x0 - used_idx 0x1 >> qemu-system-x86_64: error while loading state for instance 0x0 of device >> '0000:00:03.0/virtio-net' >> qemu-system-x86_64: load of migration failed: Operation not permitted >> Broken pipe >> qemu-system-x86_64: Failed to read msg header. Read 0 instead of 12. >> Original request 11. >> GTester: last random seed: R02S122f07a3fc35cfd5b0204e3eb45c61e6 >> qemu-system-x86_64: Failed to read msg header. Read 0 instead of 12. >> Original request 11. >> Warning: path not on HugeTLBFS: /tmp/vhost-test-60WtDz >> blkdebug: Suspended request 'A' >> blkdebug: Resuming request 'A' >> main-loop: WARNING: I/O thread spun for 1000 iterations >> main-loop: WARNING: I/O thread spun for 1000 iterations >> /home/den/src/git/qemu/tests/Makefile:400: recipe for target >> 'check-qtest-x86_64' failed >> make: *** [check-qtest-x86_64] Error 1 >> iris ~/src/git/qemu $ >> >> Sorry, if I have missed the fix in the list. > I hit this issue when backporting to a QEMU 2.3-based source tree. > This doesn't happen in qemu.git/master. > > To save anyone doing a backport a lot of time: > > If you enable vhost-user-test in a QEMU 2.3-based source tree with the > migration test case, make sure you also backport > 8c56c1a592b5092d91da8d8943c17777d6462a6f ("memory: emulate > ioeventfd"). > > Stefan and, in addition to this, 4eae2a657d1ff5ada56eb9b4966eae0eff333b0b is also necessary. Without it scenario with suspend/resume after guest reboot fails. Thank you Roma for this finding. Den