1
The following changes since commit 58560ad254fbda71d4daa6622d71683190070ee2:
1
The following changes since commit 61c265f0660ee476985808c8aa7915617c44fd53:
2
2
3
Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.2-20191024' into staging (2019-10-24 16:22:58 +0100)
3
Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20200313a' into staging (2020-03-13 10:33:04 +0000)
4
4
5
are available in the Git repository at:
5
are available in the Git repository at:
6
6
7
https://github.com/stefanha/qemu.git tags/block-pull-request
7
https://github.com/stefanha/qemu.git tags/block-pull-request
8
8
9
for you to fetch changes up to d154ef37ff885918fa3e512fd7a8e42870291667:
9
for you to fetch changes up to 4ab78b19189a81038e744728ed949d09aa477550:
10
10
11
yield_until_fd_readable: make it work with any AioContect (2019-10-25 14:38:29 +0200)
11
block/io: fix bdrv_co_do_copy_on_readv (2020-03-16 11:46:11 +0000)
12
12
13
----------------------------------------------------------------
13
----------------------------------------------------------------
14
Pull request
14
Pull request
15
15
16
----------------------------------------------------------------
16
----------------------------------------------------------------
17
17
18
Dietmar Maurer (1):
18
Vladimir Sementsov-Ogievskiy (1):
19
yield_until_fd_readable: make it work with any AioContect
19
block/io: fix bdrv_co_do_copy_on_readv
20
20
21
Julia Suvorova (1):
21
block/io.c | 2 +-
22
virtio-blk: Add blk_drain() to virtio_blk_device_unrealize()
22
1 file changed, 1 insertion(+), 1 deletion(-)
23
24
hw/block/virtio-blk.c | 1 +
25
util/qemu-coroutine-io.c | 7 +++++--
26
2 files changed, 6 insertions(+), 2 deletions(-)
27
23
28
--
24
--
29
2.21.0
25
2.24.1
30
26
31
diff view generated by jsdifflib
Deleted patch
1
From: Julia Suvorova <jusual@redhat.com>
2
1
3
QEMU does not wait for completed I/O requests, assuming that the guest
4
driver will reset the device before calling unrealize(). This does not
5
happen on Windows, and QEMU crashes in virtio_notify(), getting the
6
result of a completed I/O request on hot-unplugged device.
7
8
Signed-off-by: Julia Suvorova <jusual@redhat.com>
9
Message-Id: <20191018142856.31870-1-jusual@redhat.com>
10
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
11
---
12
hw/block/virtio-blk.c | 1 +
13
1 file changed, 1 insertion(+)
14
15
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
16
index XXXXXXX..XXXXXXX 100644
17
--- a/hw/block/virtio-blk.c
18
+++ b/hw/block/virtio-blk.c
19
@@ -XXX,XX +XXX,XX @@ static void virtio_blk_device_unrealize(DeviceState *dev, Error **errp)
20
VirtIODevice *vdev = VIRTIO_DEVICE(dev);
21
VirtIOBlock *s = VIRTIO_BLK(dev);
22
23
+ blk_drain(s->blk);
24
virtio_blk_data_plane_destroy(s->dataplane);
25
s->dataplane = NULL;
26
qemu_del_vm_change_state_handler(s->change);
27
--
28
2.21.0
29
30
diff view generated by jsdifflib
1
From: Dietmar Maurer <dietmar@proxmox.com>
1
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
2
2
3
Simply use qemu_get_current_aio_context().
3
Prior to 1143ec5ebf4 it was OK to qemu_iovec_from_buf() from aligned-up
4
buffer to original qiov, as qemu_iovec_from_buf() will stop at qiov end
5
anyway.
4
6
5
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
7
But after 1143ec5ebf4 we assume that bdrv_co_do_copy_on_readv works on
6
Message-Id: <20191024045610.9071-1-dietmar@proxmox.com>
8
part of original qiov, defined by qiov_offset and bytes. So we must not
9
touch qiov behind qiov_offset+bytes bound. Fix it.
10
11
Cc: qemu-stable@nongnu.org # v4.2
12
Fixes: 1143ec5ebf4
13
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
14
Reviewed-by: John Snow <jsnow@redhat.com>
15
Message-id: 20200312081949.5350-1-vsementsov@virtuozzo.com
7
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
16
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
8
---
17
---
9
util/qemu-coroutine-io.c | 7 +++++--
18
block/io.c | 2 +-
10
1 file changed, 5 insertions(+), 2 deletions(-)
19
1 file changed, 1 insertion(+), 1 deletion(-)
11
20
12
diff --git a/util/qemu-coroutine-io.c b/util/qemu-coroutine-io.c
21
diff --git a/block/io.c b/block/io.c
13
index XXXXXXX..XXXXXXX 100644
22
index XXXXXXX..XXXXXXX 100644
14
--- a/util/qemu-coroutine-io.c
23
--- a/block/io.c
15
+++ b/util/qemu-coroutine-io.c
24
+++ b/block/io.c
16
@@ -XXX,XX +XXX,XX @@ qemu_co_send_recv(int sockfd, void *buf, size_t bytes, bool do_send)
25
@@ -XXX,XX +XXX,XX @@ static int coroutine_fn bdrv_co_do_copy_on_readv(BdrvChild *child,
17
}
26
if (!(flags & BDRV_REQ_PREFETCH)) {
18
27
qemu_iovec_from_buf(qiov, qiov_offset + progress,
19
typedef struct {
28
bounce_buffer + skip_bytes,
20
+ AioContext *ctx;
29
- pnum - skip_bytes);
21
Coroutine *co;
30
+ MIN(pnum - skip_bytes, bytes - progress));
22
int fd;
31
}
23
} FDYieldUntilData;
32
} else if (!(flags & BDRV_REQ_PREFETCH)) {
24
@@ -XXX,XX +XXX,XX @@ typedef struct {
33
/* Read directly into the destination */
25
static void fd_coroutine_enter(void *opaque)
26
{
27
FDYieldUntilData *data = opaque;
28
- qemu_set_fd_handler(data->fd, NULL, NULL, NULL);
29
+ aio_set_fd_handler(data->ctx, data->fd, false, NULL, NULL, NULL, NULL);
30
qemu_coroutine_enter(data->co);
31
}
32
33
@@ -XXX,XX +XXX,XX @@ void coroutine_fn yield_until_fd_readable(int fd)
34
FDYieldUntilData data;
35
36
assert(qemu_in_coroutine());
37
+ data.ctx = qemu_get_current_aio_context();
38
data.co = qemu_coroutine_self();
39
data.fd = fd;
40
- qemu_set_fd_handler(fd, fd_coroutine_enter, NULL, &data);
41
+ aio_set_fd_handler(
42
+ data.ctx, fd, false, fd_coroutine_enter, NULL, NULL, &data);
43
qemu_coroutine_yield();
44
}
45
--
34
--
46
2.21.0
35
2.24.1
47
36
48
diff view generated by jsdifflib