1 | The following changes since commit 75e50c80e051423a6f55a34ee4a1eec842444a5b: | 1 | The following changes since commit 99fc08366b06282614daeda989d2fde6ab8a707f: |
---|---|---|---|
2 | 2 | ||
3 | Merge remote-tracking branch 'remotes/armbru/tags/pull-misc-2018-10-10' into staging (2018-10-11 10:43:37 +0100) | 3 | Merge tag 'seabios-20211203-pull-request' of git://git.kraxel.org/qemu into staging (2021-12-03 05:26:40 -0800) |
4 | 4 | ||
5 | are available in the Git repository at: | 5 | are available in the Git repository at: |
6 | 6 | ||
7 | git://github.com/famz/qemu.git tags/block-pull-request | 7 | https://gitlab.com/stefanha/qemu.git tags/block-pull-request |
8 | 8 | ||
9 | for you to fetch changes up to 6388147296cd4c841a7d4409ba622c200332a8c7: | 9 | for you to fetch changes up to 5b807181c27a940a3a7ad1f221a2e76a132cbdc0: |
10 | 10 | ||
11 | nvme: correct locking around completion (2018-10-12 09:46:14 +0800) | 11 | virtio-blk: Fix clean up of host notifiers for single MR transaction. (2021-12-06 14:21:14 +0000) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | Block patches | 14 | Pull request |
15 | |||
16 | One fix from Marc-André for iothread. | ||
17 | One fix from Paolo on nvme:// driver. | ||
18 | 15 | ||
19 | ---------------------------------------------------------------- | 16 | ---------------------------------------------------------------- |
20 | 17 | ||
21 | Marc-André Lureau (1): | 18 | Mark Mielke (1): |
22 | iothread: fix crash with invalid properties | 19 | virtio-blk: Fix clean up of host notifiers for single MR transaction. |
23 | 20 | ||
24 | Paolo Bonzini (1): | 21 | hw/block/dataplane/virtio-blk.c | 2 +- |
25 | nvme: correct locking around completion | 22 | 1 file changed, 1 insertion(+), 1 deletion(-) |
26 | |||
27 | block/nvme.c | 2 -- | ||
28 | iothread.c | 9 ++++++--- | ||
29 | 2 files changed, 6 insertions(+), 5 deletions(-) | ||
30 | 23 | ||
31 | -- | 24 | -- |
32 | 2.17.1 | 25 | 2.33.1 |
33 | 26 | ||
34 | 27 | ||
28 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Marc-André Lureau <marcandre.lureau@redhat.com> | ||
2 | 1 | ||
3 | -object iothread,id=foo,? will crash qemu: | ||
4 | |||
5 | qemu-system-x86_64:qemu-thread-posix.c:128: qemu_cond_destroy: Assertion `cond->initialized' failed. | ||
6 | |||
7 | Use thread_id != -1 to check if iothread_complete() finished | ||
8 | successfully and the mutex/cond have been initialized. | ||
9 | |||
10 | Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> | ||
11 | Message-Id: <20180821100716.13803-1-marcandre.lureau@redhat.com> | ||
12 | Signed-off-by: Fam Zheng <famz@redhat.com> | ||
13 | --- | ||
14 | iothread.c | 9 ++++++--- | ||
15 | 1 file changed, 6 insertions(+), 3 deletions(-) | ||
16 | |||
17 | diff --git a/iothread.c b/iothread.c | ||
18 | index XXXXXXX..XXXXXXX 100644 | ||
19 | --- a/iothread.c | ||
20 | +++ b/iothread.c | ||
21 | @@ -XXX,XX +XXX,XX @@ static void iothread_instance_init(Object *obj) | ||
22 | IOThread *iothread = IOTHREAD(obj); | ||
23 | |||
24 | iothread->poll_max_ns = IOTHREAD_POLL_MAX_NS_DEFAULT; | ||
25 | + iothread->thread_id = -1; | ||
26 | } | ||
27 | |||
28 | static void iothread_instance_finalize(Object *obj) | ||
29 | @@ -XXX,XX +XXX,XX @@ static void iothread_instance_finalize(Object *obj) | ||
30 | IOThread *iothread = IOTHREAD(obj); | ||
31 | |||
32 | iothread_stop(iothread); | ||
33 | + | ||
34 | + if (iothread->thread_id != -1) { | ||
35 | + qemu_cond_destroy(&iothread->init_done_cond); | ||
36 | + qemu_mutex_destroy(&iothread->init_done_lock); | ||
37 | + } | ||
38 | /* | ||
39 | * Before glib2 2.33.10, there is a glib2 bug that GSource context | ||
40 | * pointer may not be cleared even if the context has already been | ||
41 | @@ -XXX,XX +XXX,XX @@ static void iothread_instance_finalize(Object *obj) | ||
42 | g_main_context_unref(iothread->worker_context); | ||
43 | iothread->worker_context = NULL; | ||
44 | } | ||
45 | - qemu_cond_destroy(&iothread->init_done_cond); | ||
46 | - qemu_mutex_destroy(&iothread->init_done_lock); | ||
47 | } | ||
48 | |||
49 | static void iothread_complete(UserCreatable *obj, Error **errp) | ||
50 | @@ -XXX,XX +XXX,XX @@ static void iothread_complete(UserCreatable *obj, Error **errp) | ||
51 | |||
52 | iothread->stopping = false; | ||
53 | iothread->running = true; | ||
54 | - iothread->thread_id = -1; | ||
55 | iothread->ctx = aio_context_new(&local_error); | ||
56 | if (!iothread->ctx) { | ||
57 | error_propagate(errp, local_error); | ||
58 | -- | ||
59 | 2.17.1 | ||
60 | |||
61 | diff view generated by jsdifflib |
1 | From: Paolo Bonzini <pbonzini@redhat.com> | 1 | From: Mark Mielke <mark.mielke@gmail.com> |
---|---|---|---|
2 | 2 | ||
3 | nvme_poll_queues is already protected by q->lock, and | 3 | The code that introduced "virtio-blk: Configure all host notifiers in |
4 | AIO callbacks are invoked outside the AioContext lock. | 4 | a single MR transaction" introduced a second loop variable to perform |
5 | So remove the acquire/release pair in nvme_handle_event. | 5 | cleanup in second loop, but mistakenly still refers to the first |
6 | loop variable within the second loop body. | ||
6 | 7 | ||
7 | Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> | 8 | Fixes: d0267da61489 ("virtio-blk: Configure all host notifiers in a single MR transaction") |
8 | Message-Id: <20180814062739.19640-1-pbonzini@redhat.com> | 9 | Signed-off-by: Mark Mielke <mark.mielke@gmail.com> |
9 | Signed-off-by: Fam Zheng <famz@redhat.com> | 10 | Message-id: CALm7yL08qarOu0dnQkTN+pa=BSRC92g31YpQQNDeAiT4yLZWQQ@mail.gmail.com |
11 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
10 | --- | 12 | --- |
11 | block/nvme.c | 2 -- | 13 | hw/block/dataplane/virtio-blk.c | 2 +- |
12 | 1 file changed, 2 deletions(-) | 14 | 1 file changed, 1 insertion(+), 1 deletion(-) |
13 | 15 | ||
14 | diff --git a/block/nvme.c b/block/nvme.c | 16 | diff --git a/hw/block/dataplane/virtio-blk.c b/hw/block/dataplane/virtio-blk.c |
15 | index XXXXXXX..XXXXXXX 100644 | 17 | index XXXXXXX..XXXXXXX 100644 |
16 | --- a/block/nvme.c | 18 | --- a/hw/block/dataplane/virtio-blk.c |
17 | +++ b/block/nvme.c | 19 | +++ b/hw/block/dataplane/virtio-blk.c |
18 | @@ -XXX,XX +XXX,XX @@ static void nvme_handle_event(EventNotifier *n) | 20 | @@ -XXX,XX +XXX,XX @@ int virtio_blk_data_plane_start(VirtIODevice *vdev) |
19 | BDRVNVMeState *s = container_of(n, BDRVNVMeState, irq_notifier); | 21 | memory_region_transaction_commit(); |
20 | 22 | ||
21 | trace_nvme_handle_event(s); | 23 | while (j--) { |
22 | - aio_context_acquire(s->aio_context); | 24 | - virtio_bus_cleanup_host_notifier(VIRTIO_BUS(qbus), i); |
23 | event_notifier_test_and_clear(n); | 25 | + virtio_bus_cleanup_host_notifier(VIRTIO_BUS(qbus), j); |
24 | nvme_poll_queues(s); | 26 | } |
25 | - aio_context_release(s->aio_context); | 27 | goto fail_host_notifiers; |
26 | } | 28 | } |
27 | |||
28 | static bool nvme_add_io_queue(BlockDriverState *bs, Error **errp) | ||
29 | -- | 29 | -- |
30 | 2.17.1 | 30 | 2.33.1 |
31 | 31 | ||
32 | 32 | diff view generated by jsdifflib |