All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Andrey Korolyov <andrey@xdel.ru>
Cc: ehabkost@redhat.com,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Stefan Hajnoczi <stefanha@gmail.com>,
	knut.omang@oracle.com, qemu-stable@nongnu.org,
	Michael Roth <mdroth@linux.vnet.ibm.com>,
	Michael Tokarev <mjt@tls.msk.ru>,
	Gerd Hoffmann <kraxel@redhat.com>,
	"J. Kiszka" <jan.kiszka@siemens.com>,
	chen.fan.fnst@cn.fujitsu.com, Paolo Bonzini <pbonzini@redhat.com>,
	sebastian.tanase@openwide.fr, zhang.zhanghailiang@huawei.com
Subject: Re: [Qemu-devel] [Qemu-stable] Patch Round-up for stable 2.1.1, freeze on 2014-09-03
Date: Wed, 3 Sep 2014 09:10:15 +0300	[thread overview]
Message-ID: <20140903061015.GA5449@redhat.com> (raw)
In-Reply-To: <CABYiri_yXV1gUfEbPaZ-FEHA3XsD2Ft0Uy=8TXfTRFC1GDnzjQ@mail.gmail.com>

On Wed, Sep 03, 2014 at 02:17:02AM +0400, Andrey Korolyov wrote:
> On Wed, Sep 3, 2014 at 2:09 AM, Andrey Korolyov <andrey@xdel.ru> wrote:
> > On Wed, Sep 3, 2014 at 1:51 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> >> On Wed, Sep 03, 2014 at 01:29:29AM +0400, Andrey Korolyov wrote:
> >>> On Wed, Sep 3, 2014 at 1:03 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> >>> >> bad one is the
> >>> >>
> >>> >> Author: Jason Wang <jasowang@redhat.com>
> >>> >> Date:   Tue Sep 2 18:07:46 2014 +0300
> >>> >>
> >>> >>     vhost_net: start/stop guest notifiers properly
> >>> >
> >>> >
> >>> >
> >>> > upstream has this (pull request sent today):
> >>> > vhost_net: cleanup start/stop condition
> >>> >
> >>> > Could you apply it and see if it helps please?
> >>> >
> >>> > Michael, if it helps it should be before start/stop guest notifiers
> >>> > ideally to avoid bisect problems.
> >>>
> >>> It is already applied as shown from the list in the previous message
> >>> (there are some aio fixes too on top of 2.1 I picked before but they
> >>> should not impact vhost-net interaction in any mean). The symptoms are
> >>> a bit interesting - VM crashes only at PCI device initalization (e.g.
> >>> grub stage after reset and initrd unpacking are passing well, but then
> >>> things getting ugly). I am running 3.14 guest i686-pae kernel from
> >>> debian backports in guest, so it may be version-specific after all. If
> >>> it`ll be hard to reproduce, I can try 64bit, expecting same behavior.
> >>> Please find args in attached file.
> >>
> >>
> >>
> >> ok just to make sure - which tree do I clone exactly?
> >>
> >
> > https://github.com/mdroth/qemu.git stable-2.1-staging showing same
> > behavior for me with those patches
> 
> Forgot to mention important detail - I am playing with -mq now, so
> actually virtio-net working in a bit different way than it may
> expected (it also shown in args list from above, but someone may miss
> it):
> ...
> qemu-system-x86_64: unable to start vhost net: 95: falling back on
> userspace virtio
> qemu-system-x86_64: unable to start vhost net: 95: falling back on
> userspace virtio
> ...


OK I see at least one obvious bug there: does the following fix the
crash for you?
Separately, we need to debug why mq vhost is broken for you.
Is this a regression?

diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index ba5d544..1fe18c7 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -289,7 +289,7 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs,
     BusState *qbus = BUS(qdev_get_parent_bus(DEVICE(dev)));
     VirtioBusState *vbus = VIRTIO_BUS(qbus);
     VirtioBusClass *k = VIRTIO_BUS_GET_CLASS(vbus);
-    int r, i = 0;
+    int r, i;
 
     if (!vhost_net_device_endian_ok(dev)) {
         error_report("vhost-net does not support cross-endian");
@@ -317,16 +317,22 @@ int vhost_net_start(VirtIODevice *dev, NetClientState *ncs,
         r = vhost_net_start_one(get_vhost_net(ncs[i].peer), dev);
 
         if (r < 0) {
-            goto err;
+            goto err_start;
         }
     }
 
     return 0;
 
-err:
+err_start:
     while (--i >= 0) {
         vhost_net_stop_one(get_vhost_net(ncs[i].peer), dev);
     }
+err:
+    r = k->set_guest_notifiers(qbus->parent, total_queues * 2, false);
+    if (r < 0) {
+        fprintf(stderr, "vhost guest notifier cleanup failed: %d\n", r);
+        fflush(stderr);
+    }
     return r;
 }
 

  reply	other threads:[~2014-09-03  6:07 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27 17:35 [Qemu-devel] Patch Round-up for stable 2.1.1, freeze on 2014-09-03 Michael Roth
2014-08-27 17:35 ` [Qemu-devel] [PATCH 01/25] qmp: hide "hotplugged" device property from device-list-properties Michael Roth
2014-08-27 17:35 ` [Qemu-devel] [PATCH 02/25] qdev-monitor: include QOM properties in -device FOO, help output Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 03/25] vfio: Fix MSI-X vector expansion Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 04/25] l2tpv3 (configure): it is linux-specific Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 05/25] ide: only constrain read/write requests to drive size, not other types Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 06/25] pci: Use bus master address space for delivering MSI/MSI-X messages Michael Roth
2014-08-28 10:18   ` [Qemu-devel] [Qemu-stable] " Greg Kurz
2014-08-28 14:39     ` Michael Roth
2014-09-18 15:36       ` Greg Kurz
2014-08-27 17:36 ` [Qemu-devel] [PATCH 07/25] hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 08/25] pc-dimm: validate node property Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 09/25] pc-dimm: fix up error message Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 10/25] numa: show hex number in error message for consistency and prefix them with 0x Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 11/25] acpi: align RSDP Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 12/25] virtio-blk: fix reference a pointer which might be freed Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 13/25] target-arm: Fix return address for A64 BRK instructions Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 14/25] target-arm: Rename QEMU PSCI v0.1 definitions Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 15/25] arm/virt: Use PSCI v0.2 function IDs in the DT when KVM uses PSCI v0.2 Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 16/25] block/iscsi: fix memory corruption on iscsi resize Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 17/25] raw-posix: fix O_DIRECT short reads Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 18/25] qemu-iotests: add test case 101 for short file I/O Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 19/25] blkdebug: Delete BH in bdrv_aio_cancel Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 20/25] vmxnet3: Pad short frames to minimum size (60 bytes) Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 21/25] hostmem: set MPOL_MF_MOVE Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 22/25] pcihp: fix possible array out of bounds Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 23/25] pc: reserve more memory for ACPI for new machine types Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 24/25] thread-pool: avoid per-thread-pool EventNotifier Michael Roth
2014-08-27 17:36 ` [Qemu-devel] [PATCH 25/25] thread-pool: avoid deadlock in nested aio_poll() calls Michael Roth
2014-08-29  0:42 ` [Qemu-devel] Patch Round-up for stable 2.1.1, freeze on 2014-09-03 zhanghailiang
2014-08-29 15:12 ` Paolo Bonzini
2014-09-02  8:36 ` Michael S. Tsirkin
2014-09-02 15:20 ` [Qemu-devel] [Qemu-stable] " Michael Roth
2014-09-02 15:25   ` Michael S. Tsirkin
2014-09-02 15:27     ` Michael S. Tsirkin
2014-09-02 17:33       ` Andrey Korolyov
2014-09-02 19:53         ` Michael Roth
2014-09-02 21:03         ` Michael S. Tsirkin
2014-09-02 21:29           ` Andrey Korolyov
2014-09-02 21:51             ` Michael S. Tsirkin
2014-09-02 22:09               ` Andrey Korolyov
2014-09-02 22:17                 ` Andrey Korolyov
2014-09-03  6:10                   ` Michael S. Tsirkin [this message]
2014-09-03  7:43                     ` Andrey Korolyov
2014-09-03  8:13                       ` Michael S. Tsirkin
2014-09-03  8:36                         ` Andrey Korolyov
2014-09-03  9:07                           ` Michael S. Tsirkin
2014-09-03  9:18                             ` Andrey Korolyov
2014-09-03  9:31                               ` Michael S. Tsirkin
2014-09-03  6:35                   ` Michael S. Tsirkin
2014-09-03  5:57                     ` Jason Wang
2014-09-03  6:37                   ` Michael S. Tsirkin
2014-09-02 21:58             ` Michael Roth
2014-09-03 17:57               ` Michael S. Tsirkin
2014-09-03 18:59                 ` Michael Roth
2014-09-04 23:32   ` Michael Roth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140903061015.GA5449@redhat.com \
    --to=mst@redhat.com \
    --cc=andrey@xdel.ru \
    --cc=chen.fan.fnst@cn.fujitsu.com \
    --cc=ehabkost@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=knut.omang@oracle.com \
    --cc=kraxel@redhat.com \
    --cc=mdroth@linux.vnet.ibm.com \
    --cc=mjt@tls.msk.ru \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@nongnu.org \
    --cc=sebastian.tanase@openwide.fr \
    --cc=stefanha@gmail.com \
    --cc=zhang.zhanghailiang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.