1 | The following changes since commit b384cd95eb9c6f73ad84ed1bb0717a26e29cc78f: | 1 | The following changes since commit ea9cdbcf3a0b8d5497cddf87990f1b39d8f3bb0a: |
---|---|---|---|
2 | 2 | ||
3 | Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging (2018-01-19 16:35:25 +0000) | 3 | Merge tag 'hw-misc-20240913' of https://github.com/philmd/qemu into staging (2024-09-15 18:27:40 +0100) |
4 | 4 | ||
5 | are available in the Git repository at: | 5 | are available in the Git repository at: |
6 | 6 | ||
7 | git://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 91661dbdff76d526d22bc7ddf9df3d41e80cdbbf: | 9 | for you to fetch changes up to 89cd6254b80784a1b3f574407192493ef92fe65f: |
10 | 10 | ||
11 | block: add block_set_io_throttle virtio-blk-pci QMP example (2018-01-22 12:19:14 +0000) | 11 | hw/block: fix uint32 overflow (2024-09-17 12:12:30 +0200) |
12 | |||
13 | ---------------------------------------------------------------- | ||
14 | Pull request | ||
15 | |||
16 | An integer overflow fix for the last zone on a zoned block device whose | ||
17 | capacity is not a multiple of the zone size. | ||
12 | 18 | ||
13 | ---------------------------------------------------------------- | 19 | ---------------------------------------------------------------- |
14 | 20 | ||
15 | ---------------------------------------------------------------- | 21 | Dmitry Frolov (1): |
22 | hw/block: fix uint32 overflow | ||
16 | 23 | ||
17 | Mao Zhongyi (1): | 24 | hw/block/virtio-blk.c | 2 +- |
18 | hw/block: Use errp directly rather than local_err | 25 | 1 file changed, 1 insertion(+), 1 deletion(-) |
19 | |||
20 | Stefan Hajnoczi (1): | ||
21 | block: add block_set_io_throttle virtio-blk-pci QMP example | ||
22 | |||
23 | qapi/block-core.json | 18 ++++++++++++++++++ | ||
24 | hw/block/virtio-blk.c | 5 +---- | ||
25 | 2 files changed, 19 insertions(+), 4 deletions(-) | ||
26 | 26 | ||
27 | -- | 27 | -- |
28 | 2.14.3 | 28 | 2.46.0 |
29 | |||
30 | diff view generated by jsdifflib |
1 | From: Mao Zhongyi <maozy.fnst@cn.fujitsu.com> | 1 | From: Dmitry Frolov <frolov@swemel.ru> |
---|---|---|---|
2 | 2 | ||
3 | Cc: John Snow <jsnow@redhat.com> | 3 | The product bs->bl.zone_size * (bs->bl.nr_zones - 1) may overflow |
4 | Cc: Kevin Wolf <kwolf@redhat.com> | 4 | uint32. |
5 | Cc: Max Reitz <mreitz@redhat.com> | ||
6 | Cc: Keith Busch <keith.busch@intel.com> | ||
7 | Cc: Stefan Hajnoczi <stefanha@redhat.com> | ||
8 | Cc: "Michael S. Tsirkin" <mst@redhat.com> | ||
9 | Cc: Paolo Bonzini <pbonzini@redhat.com> | ||
10 | Cc: Gerd Hoffmann <kraxel@redhat.com> | ||
11 | Cc: Markus Armbruster <armbru@redhat.com> | ||
12 | 5 | ||
13 | Signed-off-by: Mao Zhongyi <maozy.fnst@cn.fujitsu.com> | 6 | Found by Linux Verification Center (linuxtesting.org) with SVACE. |
14 | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> | 7 | |
15 | Message-id: e77848d3735ba590f23ffbf8094379c646c33d79.1511317952.git.maozy.fnst@cn.fujitsu.com | 8 | Signed-off-by: Dmitry Frolov <frolov@swemel.ru> |
9 | Message-id: 20240917080356.270576-2-frolov@swemel.ru | ||
16 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | 10 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> |
17 | --- | 11 | --- |
18 | hw/block/virtio-blk.c | 5 +---- | 12 | hw/block/virtio-blk.c | 2 +- |
19 | 1 file changed, 1 insertion(+), 4 deletions(-) | 13 | 1 file changed, 1 insertion(+), 1 deletion(-) |
20 | 14 | ||
21 | diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c | 15 | diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c |
22 | index XXXXXXX..XXXXXXX 100644 | 16 | index XXXXXXX..XXXXXXX 100644 |
23 | --- a/hw/block/virtio-blk.c | 17 | --- a/hw/block/virtio-blk.c |
24 | +++ b/hw/block/virtio-blk.c | 18 | +++ b/hw/block/virtio-blk.c |
25 | @@ -XXX,XX +XXX,XX @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp) | 19 | @@ -XXX,XX +XXX,XX @@ static int virtio_blk_handle_zone_mgmt(VirtIOBlockReq *req, BlockZoneOp op) |
26 | VirtIODevice *vdev = VIRTIO_DEVICE(dev); | 20 | } else { |
27 | VirtIOBlock *s = VIRTIO_BLK(dev); | 21 | if (bs->bl.zone_size > capacity - offset) { |
28 | VirtIOBlkConf *conf = &s->conf; | 22 | /* The zoned device allows the last smaller zone. */ |
29 | - Error *err = NULL; | 23 | - len = capacity - bs->bl.zone_size * (bs->bl.nr_zones - 1); |
30 | unsigned i; | 24 | + len = capacity - bs->bl.zone_size * (bs->bl.nr_zones - 1ull); |
31 | 25 | } else { | |
32 | if (!conf->conf.blk) { | 26 | len = bs->bl.zone_size; |
33 | @@ -XXX,XX +XXX,XX @@ static void virtio_blk_device_realize(DeviceState *dev, Error **errp) | 27 | } |
34 | for (i = 0; i < conf->num_queues; i++) { | ||
35 | virtio_add_queue(vdev, conf->queue_size, virtio_blk_handle_output); | ||
36 | } | ||
37 | - virtio_blk_data_plane_create(vdev, conf, &s->dataplane, &err); | ||
38 | - if (err != NULL) { | ||
39 | - error_propagate(errp, err); | ||
40 | + if (!virtio_blk_data_plane_create(vdev, conf, &s->dataplane, errp)) { | ||
41 | virtio_cleanup(vdev); | ||
42 | return; | ||
43 | } | ||
44 | -- | 28 | -- |
45 | 2.14.3 | 29 | 2.46.0 |
46 | |||
47 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | The block_set_io_throttle command can look up BlockBackends by the | ||
2 | attached qdev device ID. virtio-blk-pci is a special case because the | ||
3 | actual VirtIOBlock device is the "/virtio-backend" child of the PCI | ||
4 | adapter device. | ||
5 | 1 | ||
6 | Add a QMP schema example so clients will know how to use | ||
7 | block_set_io_throttle on the virtio-blk-pci device. | ||
8 | |||
9 | The alternative is to implement some sort of aliasing for qmp_get_blk() | ||
10 | but that is likely to cause confusion and could break future use cases. | ||
11 | Let's not go there. | ||
12 | |||
13 | Cc: Kevin Wolf <kwolf@redhat.com> | ||
14 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
15 | Reviewed-by: Alberto Garcia <berto@igalia.com> | ||
16 | Message-id: 20180117090700.25811-1-stefanha@redhat.com | ||
17 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
18 | --- | ||
19 | qapi/block-core.json | 18 ++++++++++++++++++ | ||
20 | 1 file changed, 18 insertions(+) | ||
21 | |||
22 | diff --git a/qapi/block-core.json b/qapi/block-core.json | ||
23 | index XXXXXXX..XXXXXXX 100644 | ||
24 | --- a/qapi/block-core.json | ||
25 | +++ b/qapi/block-core.json | ||
26 | @@ -XXX,XX +XXX,XX @@ | ||
27 | # Example: | ||
28 | # | ||
29 | # -> { "execute": "block_set_io_throttle", | ||
30 | +# "arguments": { "id": "virtio-blk-pci0/virtio-backend", | ||
31 | +# "bps": 0, | ||
32 | +# "bps_rd": 0, | ||
33 | +# "bps_wr": 0, | ||
34 | +# "iops": 512, | ||
35 | +# "iops_rd": 0, | ||
36 | +# "iops_wr": 0, | ||
37 | +# "bps_max": 0, | ||
38 | +# "bps_rd_max": 0, | ||
39 | +# "bps_wr_max": 0, | ||
40 | +# "iops_max": 0, | ||
41 | +# "iops_rd_max": 0, | ||
42 | +# "iops_wr_max": 0, | ||
43 | +# "bps_max_length": 0, | ||
44 | +# "iops_size": 0 } } | ||
45 | +# <- { "return": {} } | ||
46 | +# | ||
47 | +# -> { "execute": "block_set_io_throttle", | ||
48 | # "arguments": { "id": "ide0-1-0", | ||
49 | # "bps": 1000000, | ||
50 | # "bps_rd": 0, | ||
51 | -- | ||
52 | 2.14.3 | ||
53 | |||
54 | diff view generated by jsdifflib |