1
The following changes since commit 346ed3151f1c43e72c40cb55b392a1d4cface62c:
1
The following changes since commit cc5ce8b8b6be83e5fe3b668dbd061ad97c534e3f:
2
2
3
Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20200206.0' into staging (2020-02-07 11:52:15 +0000)
3
Merge remote-tracking branch 'remotes/legoater/tags/pull-ppc-20220210' into staging (2022-02-13 20:33:28 +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://gitlab.com/stefanha/qemu.git tags/block-pull-request
8
8
9
for you to fetch changes up to 11a18c84db4a71497d3d40769688a01b6f64b2ad:
9
for you to fetch changes up to 4c41c69e05fe28c0f95f8abd2ebf407e95a4f04b:
10
10
11
hw/core: Allow setting 'virtio-blk-device.scsi' property on OSX host (2020-02-07 16:49:39 +0000)
11
util: adjust coroutine pool size to virtio block queue (2022-02-14 17:11:25 +0000)
12
12
13
----------------------------------------------------------------
13
----------------------------------------------------------------
14
Pull request
14
Pull request
15
15
16
This contains coroutine poll size scaling, virtiofsd rseq seccomp for new glibc
17
versions, and the QEMU C virtiofsd deprecation notice.
18
16
----------------------------------------------------------------
19
----------------------------------------------------------------
17
20
18
Philippe Mathieu-Daudé (1):
21
Christian Ehrhardt (1):
19
hw/core: Allow setting 'virtio-blk-device.scsi' property on OSX host
22
tools/virtiofsd: Add rseq syscall to the seccomp allowlist
20
23
21
Vladimir Sementsov-Ogievskiy (1):
24
Dr. David Alan Gilbert (1):
22
block: fix crash on zero-length unaligned write and read
25
Deprecate C virtiofsd
23
26
24
block/io.c | 28 +++++++++++++++++++++++++++-
27
Hiroki Narukawa (1):
25
hw/core/machine.c | 3 ++-
28
util: adjust coroutine pool size to virtio block queue
26
2 files changed, 29 insertions(+), 2 deletions(-)
29
30
docs/about/deprecated.rst | 17 +++++++++++++++++
31
include/qemu/coroutine.h | 10 ++++++++++
32
hw/block/virtio-blk.c | 5 +++++
33
tools/virtiofsd/passthrough_seccomp.c | 3 +++
34
util/qemu-coroutine.c | 20 ++++++++++++++++----
35
5 files changed, 51 insertions(+), 4 deletions(-)
27
36
28
--
37
--
29
2.24.1
38
2.34.1
30
39
31
40
diff view generated by jsdifflib
Deleted patch
1
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
2
1
3
Commit 7a3f542fbd "block/io: refactor padding" occasionally dropped
4
aligning for zero-length request: bdrv_init_padding() blindly return
5
false if bytes == 0, like there is nothing to align.
6
7
This leads the following command to crash:
8
9
./qemu-io --image-opts -c 'write 1 0' \
10
driver=blkdebug,align=512,image.driver=null-co,image.size=512
11
12
>> qemu-io: block/io.c:1955: bdrv_aligned_pwritev: Assertion
13
`(offset & (align - 1)) == 0' failed.
14
>> Aborted (core dumped)
15
16
Prior to 7a3f542fbd we does aligning of such zero requests. Instead of
17
recovering this behavior let's just do nothing on such requests as it
18
is useless.
19
20
Note that driver may have special meaning of zero-length reqeusts, like
21
qcow2_co_pwritev_compressed_part, so we can't skip any zero-length
22
operation. But for unaligned ones, we can't pass it to driver anyway.
23
24
This commit also fixes crash in iotest 80 running with -nocache:
25
26
./check -nocache -qcow2 80
27
28
which crashes on same assertion due to trying to read empty extra data
29
in qcow2_do_read_snapshots().
30
31
Cc: qemu-stable@nongnu.org # v4.2
32
Fixes: 7a3f542fbd
33
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
34
Reviewed-by: Max Reitz <mreitz@redhat.com>
35
Message-id: 20200206164245.17781-1-vsementsov@virtuozzo.com
36
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
37
---
38
block/io.c | 28 +++++++++++++++++++++++++++-
39
1 file changed, 27 insertions(+), 1 deletion(-)
40
41
diff --git a/block/io.c b/block/io.c
42
index XXXXXXX..XXXXXXX 100644
43
--- a/block/io.c
44
+++ b/block/io.c
45
@@ -XXX,XX +XXX,XX @@ static bool bdrv_init_padding(BlockDriverState *bs,
46
pad->tail = align - pad->tail;
47
}
48
49
- if ((!pad->head && !pad->tail) || !bytes) {
50
+ if (!pad->head && !pad->tail) {
51
return false;
52
}
53
54
+ assert(bytes); /* Nothing good in aligning zero-length requests */
55
+
56
sum = pad->head + bytes + pad->tail;
57
pad->buf_len = (sum > align && pad->head && pad->tail) ? 2 * align : align;
58
pad->buf = qemu_blockalign(bs, pad->buf_len);
59
@@ -XXX,XX +XXX,XX @@ int coroutine_fn bdrv_co_preadv_part(BdrvChild *child,
60
return ret;
61
}
62
63
+ if (bytes == 0 && !QEMU_IS_ALIGNED(offset, bs->bl.request_alignment)) {
64
+ /*
65
+ * Aligning zero request is nonsense. Even if driver has special meaning
66
+ * of zero-length (like qcow2_co_pwritev_compressed_part), we can't pass
67
+ * it to driver due to request_alignment.
68
+ *
69
+ * Still, no reason to return an error if someone do unaligned
70
+ * zero-length read occasionally.
71
+ */
72
+ return 0;
73
+ }
74
+
75
bdrv_inc_in_flight(bs);
76
77
/* Don't do copy-on-read if we read data before write operation */
78
@@ -XXX,XX +XXX,XX @@ int coroutine_fn bdrv_co_pwritev_part(BdrvChild *child,
79
return -ENOTSUP;
80
}
81
82
+ if (bytes == 0 && !QEMU_IS_ALIGNED(offset, bs->bl.request_alignment)) {
83
+ /*
84
+ * Aligning zero request is nonsense. Even if driver has special meaning
85
+ * of zero-length (like qcow2_co_pwritev_compressed_part), we can't pass
86
+ * it to driver due to request_alignment.
87
+ *
88
+ * Still, no reason to return an error if someone do unaligned
89
+ * zero-length write occasionally.
90
+ */
91
+ return 0;
92
+ }
93
+
94
bdrv_inc_in_flight(bs);
95
/*
96
* Align write if necessary by performing a read-modify-write cycle.
97
--
98
2.24.1
99
100
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
2
1
3
Commit ed65fd1a2750 ("virtio-blk: switch off scsi-passthrough by
4
default") changed the default value of the 'scsi' property of
5
virtio-blk, which is only available on Linux hosts. It also added
6
an unconditional compat entry for 2.4 or earlier machines.
7
8
Trying to set this property on a pre-2.5 machine on OSX, we get:
9
10
Unexpected error in object_property_find() at qom/object.c:1201:
11
qemu-system-x86_64: -device virtio-blk-pci,id=scsi0,drive=drive0: can't apply global virtio-blk-device.scsi=true: Property '.scsi' not found
12
13
Fix this error by marking the property optional.
14
15
Fixes: ed65fd1a27 ("virtio-blk: switch off scsi-passthrough by default")
16
Suggested-by: Cornelia Huck <cohuck@redhat.com>
17
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
18
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
19
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
20
Message-id: 20200207001404.1739-1-philmd@redhat.com
21
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
22
---
23
hw/core/machine.c | 3 ++-
24
1 file changed, 2 insertions(+), 1 deletion(-)
25
26
diff --git a/hw/core/machine.c b/hw/core/machine.c
27
index XXXXXXX..XXXXXXX 100644
28
--- a/hw/core/machine.c
29
+++ b/hw/core/machine.c
30
@@ -XXX,XX +XXX,XX @@ GlobalProperty hw_compat_2_5[] = {
31
const size_t hw_compat_2_5_len = G_N_ELEMENTS(hw_compat_2_5);
32
33
GlobalProperty hw_compat_2_4[] = {
34
- { "virtio-blk-device", "scsi", "true" },
35
+ /* Optional because the 'scsi' property is Linux-only */
36
+ { "virtio-blk-device", "scsi", "true", .optional = true },
37
{ "e1000", "extra_mac_registers", "off" },
38
{ "virtio-pci", "x-disable-pcie", "on" },
39
{ "virtio-pci", "migrate-extra", "off" },
40
--
41
2.24.1
42
43
diff view generated by jsdifflib