On 11/25/19 12:38 PM, Stefan Reiter wrote: > See: https://lists.nongnu.org/archive/html/qemu-devel/2019-09/msg03201.html > > Signed-off-by: Stefan Reiter <s.rei...@proxmox.com> > --- > ...ule-virtio_notify_config-to-run-on-m.patch | 76 +++++++++++++++++++ > debian/patches/series | 1 + > 2 files changed, 77 insertions(+) > create mode 100644 > debian/patches/extra/0002-virtio-blk-schedule-virtio_notify_config-to-run-on-m.patch > > diff --git > a/debian/patches/extra/0002-virtio-blk-schedule-virtio_notify_config-to-run-on-m.patch > > b/debian/patches/extra/0002-virtio-blk-schedule-virtio_notify_config-to-run-on-m.patch > new file mode 100644 > index 0000000..f20c7d7 > --- /dev/null > +++ > b/debian/patches/extra/0002-virtio-blk-schedule-virtio_notify_config-to-run-on-m.patch > @@ -0,0 +1,76 @@ > +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 > +From: Sergio Lopez <s...@redhat.com> > +Date: Mon, 16 Sep 2019 13:24:12 +0200 > +Subject: [PATCH] virtio-blk: schedule virtio_notify_config to run on main > + context > + > +virtio_notify_config() needs to acquire the global mutex, which isn't > +allowed from an iothread, and may lead to a deadlock like this: > + > + - main thead > + * Has acquired: qemu_global_mutex. > + * Is trying the acquire: iothread AioContext lock via > + AIO_WAIT_WHILE (after aio_poll). > + > + - iothread > + * Has acquired: AioContext lock. > + * Is trying to acquire: qemu_global_mutex (via > + virtio_notify_config->prepare_mmio_access). > + > +If virtio_blk_resize() is called from an iothread, schedule > +virtio_notify_config() to be run in the main context BH. > + > +[Removed unnecessary newline as suggested by Kevin Wolf > +<kw...@redhat.com>. > +--Stefan] > + > +Signed-off-by: Sergio Lopez <s...@redhat.com> > +Reviewed-by: Kevin Wolf <kw...@redhat.com> > +Message-id: 20190916112411.21636-1-...@redhat.com > +Message-Id: <20190916112411.21636-1-...@redhat.com> > +Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> > +--- > + hw/block/virtio-blk.c | 16 +++++++++++++++- > + 1 file changed, 15 insertions(+), 1 deletion(-) > +
applied, thanks! _______________________________________________ pve-devel mailing list pve-devel@pve.proxmox.com https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel