1 | The following changes since commit 0a301624c2f4ced3331ffd5bce85b4274fe132af: | 1 | The following changes since commit 60205b71421cbc529ca60b12c79e0eeace007319: |
---|---|---|---|
2 | 2 | ||
3 | Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20220208' into staging (2022-02-08 11:40:08 +0000) | 3 | Merge tag 'pull-aspeed-20220801' of https://github.com/legoater/qemu into staging (2022-08-01 13:55:11 -0700) |
4 | 4 | ||
5 | are available in the Git repository at: | 5 | are available in the Git repository at: |
6 | 6 | ||
7 | https://gitlab.com/kmwolf/qemu.git tags/for-upstream | 7 | git://repo.or.cz/qemu/kevin.git tags/for-upstream |
8 | 8 | ||
9 | for you to fetch changes up to fdb8541b2e4f6ff60f435fbb5a5e1df20c275a86: | 9 | for you to fetch changes up to 21b1d974595b3986c68fe80a1f7e9b87886d4bae: |
10 | 10 | ||
11 | hw/block/fdc-isa: Respect QOM properties when building AML (2022-02-11 17:37:26 +0100) | 11 | main loop: add missing documentation links to GS/IO macros (2022-08-02 12:02:17 +0200) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | Block layer patches | 14 | Block layer patches |
15 | 15 | ||
16 | - Fix crash in blockdev-reopen with iothreads | 16 | - libvduse: Coverity fixes |
17 | - fdc-isa: Respect QOM properties when building AML | 17 | - hd-geometry: Fix ignored bios-chs-trans setting |
18 | - io_uring: Fix compiler warning (missing #include) | ||
19 | - main loop: add missing documentation links to GS/IO macros | ||
20 | - qemu-iotests: Discard stderr when probing devices | ||
18 | 21 | ||
19 | ---------------------------------------------------------------- | 22 | ---------------------------------------------------------------- |
20 | Bernhard Beschow (1): | 23 | Cole Robinson (1): |
21 | hw/block/fdc-isa: Respect QOM properties when building AML | 24 | qemu-iotests: Discard stderr when probing devices |
22 | 25 | ||
23 | Kevin Wolf (2): | 26 | Emanuele Giuseppe Esposito (1): |
24 | block: Lock AioContext for drain_end in blockdev-reopen | 27 | main loop: add missing documentation links to GS/IO macros |
25 | iotests: Test blockdev-reopen with iothreads and throttling | ||
26 | 28 | ||
27 | blockdev.c | 11 ++++++++++- | 29 | Jinhao Fan (1): |
28 | hw/block/fdc-isa.c | 11 +++++++---- | 30 | block/io_uring: add missing include file |
29 | tests/qemu-iotests/245 | 36 +++++++++++++++++++++++++++++++++--- | ||
30 | tests/qemu-iotests/245.out | 4 ++-- | ||
31 | 4 files changed, 52 insertions(+), 10 deletions(-) | ||
32 | 31 | ||
32 | Lev Kujawski (1): | ||
33 | hw/block/hd-geometry: Do not override specified bios-chs-trans | ||
33 | 34 | ||
35 | Xie Yongji (3): | ||
36 | libvduse: Fix the incorrect function name | ||
37 | libvduse: Replace strcpy() with strncpy() | ||
38 | libvduse: Pass positive value to strerror() | ||
39 | |||
40 | include/qemu/main-loop.h | 18 +++++++++++++++--- | ||
41 | block/io_uring.c | 1 + | ||
42 | hw/block/hd-geometry.c | 7 ++++++- | ||
43 | subprojects/libvduse/libvduse.c | 13 +++++++------ | ||
44 | tests/qemu-iotests/common.rc | 4 ++-- | ||
45 | 5 files changed, 31 insertions(+), 12 deletions(-) | diff view generated by jsdifflib |
1 | From: Bernhard Beschow <shentey@gmail.com> | 1 | From: Jinhao Fan <fanjinhao21s@ict.ac.cn> |
---|---|---|---|
2 | 2 | ||
3 | Other ISA devices such as serial-isa use the properties in their | 3 | The commit "Use io_uring_register_ring_fd() to skip fd operations" uses |
4 | build_aml functions. fdc-isa not using them is probably an oversight. | 4 | warn_report but did not include the header file "qemu/error-report.h". |
5 | This causes "error: implicit declaration of function ‘warn_report’". | ||
6 | Include this header file. | ||
5 | 7 | ||
6 | Signed-off-by: Bernhard Beschow <shentey@gmail.com> | 8 | Fixes: e2848bc574 ("Use io_uring_register_ring_fd() to skip fd operations") |
7 | Message-Id: <20220209191558.30393-1-shentey@gmail.com> | 9 | Signed-off-by: Jinhao Fan <fanjinhao21s@ict.ac.cn> |
8 | Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> | 10 | Message-Id: <20220721065645.577404-1-fanjinhao21s@ict.ac.cn> |
11 | Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> | ||
9 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 12 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
10 | --- | 13 | --- |
11 | hw/block/fdc-isa.c | 11 +++++++---- | 14 | block/io_uring.c | 1 + |
12 | 1 file changed, 7 insertions(+), 4 deletions(-) | 15 | 1 file changed, 1 insertion(+) |
13 | 16 | ||
14 | diff --git a/hw/block/fdc-isa.c b/hw/block/fdc-isa.c | 17 | diff --git a/block/io_uring.c b/block/io_uring.c |
15 | index XXXXXXX..XXXXXXX 100644 | 18 | index XXXXXXX..XXXXXXX 100644 |
16 | --- a/hw/block/fdc-isa.c | 19 | --- a/block/io_uring.c |
17 | +++ b/hw/block/fdc-isa.c | 20 | +++ b/block/io_uring.c |
18 | @@ -XXX,XX +XXX,XX @@ int cmos_get_fd_drive_type(FloppyDriveType fd0) | 21 | @@ -XXX,XX +XXX,XX @@ |
19 | 22 | #include "qemu/osdep.h" | |
20 | static void fdc_isa_build_aml(ISADevice *isadev, Aml *scope) | 23 | #include <liburing.h> |
21 | { | 24 | #include "block/aio.h" |
22 | + FDCtrlISABus *isa = ISA_FDC(isadev); | 25 | +#include "qemu/error-report.h" |
23 | Aml *dev; | 26 | #include "qemu/queue.h" |
24 | Aml *crs; | 27 | #include "block/block.h" |
25 | int i; | 28 | #include "block/raw-aio.h" |
26 | @@ -XXX,XX +XXX,XX @@ static void fdc_isa_build_aml(ISADevice *isadev, Aml *scope) | ||
27 | }; | ||
28 | |||
29 | crs = aml_resource_template(); | ||
30 | - aml_append(crs, aml_io(AML_DECODE16, 0x03F2, 0x03F2, 0x00, 0x04)); | ||
31 | - aml_append(crs, aml_io(AML_DECODE16, 0x03F7, 0x03F7, 0x00, 0x01)); | ||
32 | - aml_append(crs, aml_irq_no_flags(6)); | ||
33 | aml_append(crs, | ||
34 | - aml_dma(AML_COMPATIBILITY, AML_NOTBUSMASTER, AML_TRANSFER8, 2)); | ||
35 | + aml_io(AML_DECODE16, isa->iobase + 2, isa->iobase + 2, 0x00, 0x04)); | ||
36 | + aml_append(crs, | ||
37 | + aml_io(AML_DECODE16, isa->iobase + 7, isa->iobase + 7, 0x00, 0x01)); | ||
38 | + aml_append(crs, aml_irq_no_flags(isa->irq)); | ||
39 | + aml_append(crs, | ||
40 | + aml_dma(AML_COMPATIBILITY, AML_NOTBUSMASTER, AML_TRANSFER8, isa->dma)); | ||
41 | |||
42 | dev = aml_device("FDC0"); | ||
43 | aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0700"))); | ||
44 | -- | 29 | -- |
45 | 2.34.1 | 30 | 2.35.3 |
46 | 31 | ||
47 | 32 | diff view generated by jsdifflib |
1 | The 'throttle' block driver implements .bdrv_co_drain_end, so | 1 | From: Xie Yongji <xieyongji@bytedance.com> |
---|---|---|---|
2 | blockdev-reopen will have to wait for it to complete in the polling | ||
3 | loop at the end of qmp_blockdev_reopen(). This makes AIO_WAIT_WHILE() | ||
4 | release the AioContext lock, which causes a crash if the lock hasn't | ||
5 | correctly been taken. | ||
6 | 2 | ||
7 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 3 | In vduse_name_is_valid(), we actually check whether |
8 | Message-Id: <20220203140534.36522-3-kwolf@redhat.com> | 4 | the name is invalid or not. So let's change the |
9 | Reviewed-by: Hanna Reitz <hreitz@redhat.com> | 5 | function name to vduse_name_is_invalid() to match |
6 | the behavior. | ||
7 | |||
8 | Signed-off-by: Xie Yongji <xieyongji@bytedance.com> | ||
9 | Reviewed-by: Markus Armbruster <armbru@redhat.com> | ||
10 | Message-Id: <20220706095624.328-2-xieyongji@bytedance.com> | ||
10 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 11 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
11 | --- | 12 | --- |
12 | tests/qemu-iotests/245 | 36 +++++++++++++++++++++++++++++++++--- | 13 | subprojects/libvduse/libvduse.c | 6 +++--- |
13 | tests/qemu-iotests/245.out | 4 ++-- | 14 | 1 file changed, 3 insertions(+), 3 deletions(-) |
14 | 2 files changed, 35 insertions(+), 5 deletions(-) | ||
15 | 15 | ||
16 | diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245 | 16 | diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvduse.c |
17 | index XXXXXXX..XXXXXXX 100755 | ||
18 | --- a/tests/qemu-iotests/245 | ||
19 | +++ b/tests/qemu-iotests/245 | ||
20 | @@ -XXX,XX +XXX,XX @@ class TestBlockdevReopen(iotests.QMPTestCase): | ||
21 | self.assertEqual(self.get_node('hd1'), None) | ||
22 | self.assert_qmp(self.get_node('hd2'), 'ro', True) | ||
23 | |||
24 | - def run_test_iothreads(self, iothread_a, iothread_b, errmsg = None): | ||
25 | - opts = hd_opts(0) | ||
26 | + def run_test_iothreads(self, iothread_a, iothread_b, errmsg = None, | ||
27 | + opts_a = None, opts_b = None): | ||
28 | + opts = opts_a or hd_opts(0) | ||
29 | result = self.vm.qmp('blockdev-add', conv_keys = False, **opts) | ||
30 | self.assert_qmp(result, 'return', {}) | ||
31 | |||
32 | - opts2 = hd_opts(2) | ||
33 | + opts2 = opts_b or hd_opts(2) | ||
34 | result = self.vm.qmp('blockdev-add', conv_keys = False, **opts2) | ||
35 | self.assert_qmp(result, 'return', {}) | ||
36 | |||
37 | @@ -XXX,XX +XXX,XX @@ class TestBlockdevReopen(iotests.QMPTestCase): | ||
38 | def test_iothreads_switch_overlay(self): | ||
39 | self.run_test_iothreads('', 'iothread0') | ||
40 | |||
41 | + def test_iothreads_with_throttling(self): | ||
42 | + # Create a throttle-group object | ||
43 | + opts = { 'qom-type': 'throttle-group', 'id': 'group0', | ||
44 | + 'limits': { 'iops-total': 1000 } } | ||
45 | + result = self.vm.qmp('object-add', conv_keys = False, **opts) | ||
46 | + self.assert_qmp(result, 'return', {}) | ||
47 | + | ||
48 | + # Options with a throttle filter between format and protocol | ||
49 | + opts = [ | ||
50 | + { | ||
51 | + 'driver': iotests.imgfmt, | ||
52 | + 'node-name': f'hd{idx}', | ||
53 | + 'file' : { | ||
54 | + 'node-name': f'hd{idx}-throttle', | ||
55 | + 'driver': 'throttle', | ||
56 | + 'throttle-group': 'group0', | ||
57 | + 'file': { | ||
58 | + 'driver': 'file', | ||
59 | + 'node-name': f'hd{idx}-file', | ||
60 | + 'filename': hd_path[idx], | ||
61 | + }, | ||
62 | + }, | ||
63 | + } | ||
64 | + for idx in (0, 2) | ||
65 | + ] | ||
66 | + | ||
67 | + self.run_test_iothreads('iothread0', 'iothread0', None, | ||
68 | + opts[0], opts[1]) | ||
69 | + | ||
70 | if __name__ == '__main__': | ||
71 | iotests.activate_logging() | ||
72 | iotests.main(supported_fmts=["qcow2"], | ||
73 | diff --git a/tests/qemu-iotests/245.out b/tests/qemu-iotests/245.out | ||
74 | index XXXXXXX..XXXXXXX 100644 | 17 | index XXXXXXX..XXXXXXX 100644 |
75 | --- a/tests/qemu-iotests/245.out | 18 | --- a/subprojects/libvduse/libvduse.c |
76 | +++ b/tests/qemu-iotests/245.out | 19 | +++ b/subprojects/libvduse/libvduse.c |
77 | @@ -XXX,XX +XXX,XX @@ read 1/1 bytes at offset 262152 | 20 | @@ -XXX,XX +XXX,XX @@ static int vduse_dev_init(VduseDev *dev, const char *name, |
78 | read 1/1 bytes at offset 262160 | 21 | return 0; |
79 | 1 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec) | 22 | } |
80 | 23 | ||
81 | -............... | 24 | -static inline bool vduse_name_is_valid(const char *name) |
82 | +................ | 25 | +static inline bool vduse_name_is_invalid(const char *name) |
83 | ---------------------------------------------------------------------- | 26 | { |
84 | -Ran 25 tests | 27 | return strlen(name) >= VDUSE_NAME_MAX || strstr(name, ".."); |
85 | +Ran 26 tests | 28 | } |
86 | 29 | @@ -XXX,XX +XXX,XX @@ VduseDev *vduse_dev_create_by_name(const char *name, uint16_t num_queues, | |
87 | OK | 30 | VduseDev *dev; |
31 | int ret; | ||
32 | |||
33 | - if (!name || vduse_name_is_valid(name) || !ops || | ||
34 | + if (!name || vduse_name_is_invalid(name) || !ops || | ||
35 | !ops->enable_queue || !ops->disable_queue) { | ||
36 | fprintf(stderr, "Invalid parameter for vduse\n"); | ||
37 | return NULL; | ||
38 | @@ -XXX,XX +XXX,XX @@ VduseDev *vduse_dev_create(const char *name, uint32_t device_id, | ||
39 | struct vduse_dev_config *dev_config; | ||
40 | size_t size = offsetof(struct vduse_dev_config, config); | ||
41 | |||
42 | - if (!name || vduse_name_is_valid(name) || | ||
43 | + if (!name || vduse_name_is_invalid(name) || | ||
44 | !has_feature(features, VIRTIO_F_VERSION_1) || !config || | ||
45 | !config_size || !ops || !ops->enable_queue || !ops->disable_queue) { | ||
46 | fprintf(stderr, "Invalid parameter for vduse\n"); | ||
88 | -- | 47 | -- |
89 | 2.34.1 | 48 | 2.35.3 |
90 | |||
91 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | From: Xie Yongji <xieyongji@bytedance.com> | ||
1 | 2 | ||
3 | Coverity reported a string overflow issue since we copied | ||
4 | "name" to "dev_config->name" without checking the length. | ||
5 | This should be a false positive since we already checked | ||
6 | the length of "name" in vduse_name_is_invalid(). But anyway, | ||
7 | let's replace strcpy() with strncpy() (as a general library, | ||
8 | we'd like to minimize dependencies on other libraries, so we | ||
9 | didn't use g_strlcpy() here) to fix the coverity complaint. | ||
10 | |||
11 | Fixes: Coverity CID 1490224 | ||
12 | Signed-off-by: Xie Yongji <xieyongji@bytedance.com> | ||
13 | Reviewed-by: Markus Armbruster <armbru@redhat.com> | ||
14 | Message-Id: <20220706095624.328-3-xieyongji@bytedance.com> | ||
15 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
16 | --- | ||
17 | subprojects/libvduse/libvduse.c | 3 ++- | ||
18 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvduse.c | ||
21 | index XXXXXXX..XXXXXXX 100644 | ||
22 | --- a/subprojects/libvduse/libvduse.c | ||
23 | +++ b/subprojects/libvduse/libvduse.c | ||
24 | @@ -XXX,XX +XXX,XX @@ VduseDev *vduse_dev_create(const char *name, uint32_t device_id, | ||
25 | goto err_dev; | ||
26 | } | ||
27 | |||
28 | - strcpy(dev_config->name, name); | ||
29 | + strncpy(dev_config->name, name, VDUSE_NAME_MAX); | ||
30 | + dev_config->name[VDUSE_NAME_MAX - 1] = '\0'; | ||
31 | dev_config->device_id = device_id; | ||
32 | dev_config->vendor_id = vendor_id; | ||
33 | dev_config->features = features; | ||
34 | -- | ||
35 | 2.35.3 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | From: Xie Yongji <xieyongji@bytedance.com> | ||
1 | 2 | ||
3 | The value passed to strerror() should be positive. | ||
4 | So let's fix it. | ||
5 | |||
6 | Fixes: Coverity CID 1490226, 1490223 | ||
7 | Signed-off-by: Xie Yongji <xieyongji@bytedance.com> | ||
8 | Reviewed-by: Richard Henderson <richard.henderson@linaro.org> | ||
9 | Reviewed-by: Markus Armbruster <armbru@redhat.com> | ||
10 | Message-Id: <20220706095624.328-4-xieyongji@bytedance.com> | ||
11 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
12 | --- | ||
13 | subprojects/libvduse/libvduse.c | 4 ++-- | ||
14 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/subprojects/libvduse/libvduse.c b/subprojects/libvduse/libvduse.c | ||
17 | index XXXXXXX..XXXXXXX 100644 | ||
18 | --- a/subprojects/libvduse/libvduse.c | ||
19 | +++ b/subprojects/libvduse/libvduse.c | ||
20 | @@ -XXX,XX +XXX,XX @@ VduseDev *vduse_dev_create_by_name(const char *name, uint16_t num_queues, | ||
21 | ret = vduse_dev_init(dev, name, num_queues, ops, priv); | ||
22 | if (ret < 0) { | ||
23 | fprintf(stderr, "Failed to init vduse device %s: %s\n", | ||
24 | - name, strerror(ret)); | ||
25 | + name, strerror(-ret)); | ||
26 | free(dev); | ||
27 | return NULL; | ||
28 | } | ||
29 | @@ -XXX,XX +XXX,XX @@ VduseDev *vduse_dev_create(const char *name, uint32_t device_id, | ||
30 | ret = vduse_dev_init(dev, name, num_queues, ops, priv); | ||
31 | if (ret < 0) { | ||
32 | fprintf(stderr, "Failed to init vduse device %s: %s\n", | ||
33 | - name, strerror(ret)); | ||
34 | + name, strerror(-ret)); | ||
35 | goto err; | ||
36 | } | ||
37 | |||
38 | -- | ||
39 | 2.35.3 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | From: Lev Kujawski <lkujaw@member.fsf.org> | ||
1 | 2 | ||
3 | For small disk images (<4 GiB), QEMU and SeaBIOS default to the | ||
4 | LARGE/ECHS disk translation method, but it is not uncommon for other | ||
5 | BIOS software to use LBA in these cases as well. Some operating | ||
6 | system boot loaders (e.g., NT 4) do not handle LARGE translations | ||
7 | outside of fixed configurations. See, e.g., Q154052: | ||
8 | |||
9 | "When starting an x86 based computer, Ntdetect.com retrieves and | ||
10 | stores Interrupt 13 information. . . If the disk controller is using a | ||
11 | 32 sector/64 head translation scheme, this boundary will be 1 GB. If | ||
12 | the controller uses 63 sector/255 head translation [AUTHOR: i.e., | ||
13 | LBA], the limit will be 4 GB." | ||
14 | |||
15 | To accommodate these situations, hd_geometry_guess() now follows the | ||
16 | disk translation specified by the user even when the ATA disk geometry | ||
17 | is guessed. | ||
18 | |||
19 | hd_geometry_guess(): | ||
20 | * Only set the disk translation when translation is AUTO. | ||
21 | * Show the soon-to-be active translation (*ptrans) in the trace rather | ||
22 | than what was guessed. | ||
23 | |||
24 | Resolves: https://gitlab.com/qemu-project/qemu/-/issues/56 | ||
25 | Buglink: https://bugs.launchpad.net/qemu/+bug/1745312 | ||
26 | |||
27 | Signed-off-by: Lev Kujawski <lkujaw@member.fsf.org> | ||
28 | Message-Id: <20220707204045.999544-1-lkujaw@member.fsf.org> | ||
29 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
30 | --- | ||
31 | hw/block/hd-geometry.c | 7 ++++++- | ||
32 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
33 | |||
34 | diff --git a/hw/block/hd-geometry.c b/hw/block/hd-geometry.c | ||
35 | index XXXXXXX..XXXXXXX 100644 | ||
36 | --- a/hw/block/hd-geometry.c | ||
37 | +++ b/hw/block/hd-geometry.c | ||
38 | @@ -XXX,XX +XXX,XX @@ void hd_geometry_guess(BlockBackend *blk, | ||
39 | translation = BIOS_ATA_TRANSLATION_NONE; | ||
40 | } | ||
41 | if (ptrans) { | ||
42 | - *ptrans = translation; | ||
43 | + if (*ptrans == BIOS_ATA_TRANSLATION_AUTO) { | ||
44 | + *ptrans = translation; | ||
45 | + } else { | ||
46 | + /* Defer to the translation specified by the user. */ | ||
47 | + translation = *ptrans; | ||
48 | + } | ||
49 | } | ||
50 | trace_hd_geometry_guess(blk, *pcyls, *pheads, *psecs, translation); | ||
51 | } | ||
52 | -- | ||
53 | 2.35.3 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | From: Cole Robinson <crobinso@redhat.com> | ||
1 | 2 | ||
3 | qemu-iotests fails in the following setup: | ||
4 | |||
5 | ./configure --enable-modules --enable-smartcard \ | ||
6 | --target-list=x86_64-softmmu,s390x-softmmu | ||
7 | make | ||
8 | cd build | ||
9 | QEMU_PROG=`pwd`/s390x-softmmu/qemu-system-s390x \ | ||
10 | ../tests/check-block.sh qcow2 | ||
11 | ... | ||
12 | --- /home/crobinso/src/qemu/tests/qemu-iotests/127.out | ||
13 | +++ /home/crobinso/src/qemu/build/tests/qemu-iotests/scratch/127.out.bad | ||
14 | @@ -1,4 +1,18 @@ | ||
15 | QA output created by 127 | ||
16 | +Failed to open module: /home/crobinso/src/qemu/build/hw-usb-smartcard.so: undefined symbol: ccid_card_ccid_attach | ||
17 | ... | ||
18 | --- /home/crobinso/src/qemu/tests/qemu-iotests/267.out | ||
19 | +++ /home/crobinso/src/qemu/build/tests/qemu-iotests/scratch/267.out.bad | ||
20 | @@ -1,4 +1,11 @@ | ||
21 | QA output created by 267 | ||
22 | +Failed to open module: /home/crobinso/src/qemu/build/hw-usb-smartcard.so: undefined symbol: ccid_card_ccid_attach | ||
23 | |||
24 | The stderr spew is its own known issue, but seems like iotests should | ||
25 | be discarding stderr in this case. | ||
26 | |||
27 | Signed-off-by: Cole Robinson <crobinso@redhat.com> | ||
28 | Reviewed-by: Thomas Huth <thuth@redhat.com> | ||
29 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | ||
30 | --- | ||
31 | tests/qemu-iotests/common.rc | 4 ++-- | ||
32 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
33 | |||
34 | diff --git a/tests/qemu-iotests/common.rc b/tests/qemu-iotests/common.rc | ||
35 | index XXXXXXX..XXXXXXX 100644 | ||
36 | --- a/tests/qemu-iotests/common.rc | ||
37 | +++ b/tests/qemu-iotests/common.rc | ||
38 | @@ -XXX,XX +XXX,XX @@ _require_large_file() | ||
39 | # | ||
40 | _require_devices() | ||
41 | { | ||
42 | - available=$($QEMU -M none -device help | \ | ||
43 | + available=$($QEMU -M none -device help 2> /dev/null | \ | ||
44 | grep ^name | sed -e 's/^name "//' -e 's/".*$//') | ||
45 | for device | ||
46 | do | ||
47 | @@ -XXX,XX +XXX,XX @@ _require_devices() | ||
48 | |||
49 | _require_one_device_of() | ||
50 | { | ||
51 | - available=$($QEMU -M none -device help | \ | ||
52 | + available=$($QEMU -M none -device help 2> /dev/null | \ | ||
53 | grep ^name | sed -e 's/^name "//' -e 's/".*$//') | ||
54 | for device | ||
55 | do | ||
56 | -- | ||
57 | 2.35.3 | diff view generated by jsdifflib |
1 | bdrv_subtree_drained_end() requires the caller to hold the AioContext | 1 | From: Emanuele Giuseppe Esposito <eesposit@redhat.com> |
---|---|---|---|
2 | lock for the drained node. Not doing this for nodes outside of the main | ||
3 | AioContext leads to crashes when AIO_WAIT_WHILE() needs to wait and | ||
4 | tries to temporarily release the lock. | ||
5 | 2 | ||
6 | Fixes: 3908b7a8994fa5ef7a89aa58cd5a02fc58141592 | 3 | If we go directly to GLOBAL_STATE_CODE, IO_CODE or IO_OR_GS_CODE |
7 | Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2046659 | 4 | definition, we just find that they "mark and check that the function |
8 | Reported-by: Qing Wang <qinwang@redhat.com> | 5 | is part of the {category} API". |
9 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 6 | However, ther is no definition on what {category} API is, they are |
10 | Message-Id: <20220203140534.36522-2-kwolf@redhat.com> | 7 | in include/block/block-*.h |
11 | Reviewed-by: Hanna Reitz <hreitz@redhat.com> | 8 | Therefore, add a comment that refers to such documentation. |
9 | |||
10 | Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> | ||
11 | Message-Id: <20220609122206.1016936-1-eesposit@redhat.com> | ||
12 | Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
12 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> | 13 | Signed-off-by: Kevin Wolf <kwolf@redhat.com> |
13 | --- | 14 | --- |
14 | blockdev.c | 11 ++++++++++- | 15 | include/qemu/main-loop.h | 18 +++++++++++++++--- |
15 | 1 file changed, 10 insertions(+), 1 deletion(-) | 16 | 1 file changed, 15 insertions(+), 3 deletions(-) |
16 | 17 | ||
17 | diff --git a/blockdev.c b/blockdev.c | 18 | diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h |
18 | index XXXXXXX..XXXXXXX 100644 | 19 | index XXXXXXX..XXXXXXX 100644 |
19 | --- a/blockdev.c | 20 | --- a/include/qemu/main-loop.h |
20 | +++ b/blockdev.c | 21 | +++ b/include/qemu/main-loop.h |
21 | @@ -XXX,XX +XXX,XX @@ void qmp_blockdev_reopen(BlockdevOptionsList *reopen_list, Error **errp) | 22 | @@ -XXX,XX +XXX,XX @@ bool qemu_mutex_iothread_locked(void); |
22 | { | 23 | */ |
23 | BlockReopenQueue *queue = NULL; | 24 | bool qemu_in_main_thread(void); |
24 | GSList *drained = NULL; | 25 | |
25 | + GSList *p; | 26 | -/* Mark and check that the function is part of the global state API. */ |
26 | 27 | +/* | |
27 | /* Add each one of the BDS that we want to reopen to the queue */ | 28 | + * Mark and check that the function is part of the Global State API. |
28 | for (; reopen_list != NULL; reopen_list = reopen_list->next) { | 29 | + * Please refer to include/block/block-global-state.h for more |
29 | @@ -XXX,XX +XXX,XX @@ void qmp_blockdev_reopen(BlockdevOptionsList *reopen_list, Error **errp) | 30 | + * information about GS API. |
30 | 31 | + */ | |
31 | fail: | 32 | #ifdef CONFIG_COCOA |
32 | bdrv_reopen_queue_free(queue); | 33 | /* |
33 | - g_slist_free_full(drained, (GDestroyNotify) bdrv_subtree_drained_end); | 34 | * When using the Cocoa UI, addRemovableDevicesMenuItems() is called from |
34 | + for (p = drained; p; p = p->next) { | 35 | @@ -XXX,XX +XXX,XX @@ bool qemu_in_main_thread(void); |
35 | + BlockDriverState *bs = p->data; | 36 | } while (0) |
36 | + AioContext *ctx = bdrv_get_aio_context(bs); | 37 | #endif /* CONFIG_COCOA */ |
37 | + | 38 | |
38 | + aio_context_acquire(ctx); | 39 | -/* Mark and check that the function is part of the I/O API. */ |
39 | + bdrv_subtree_drained_end(bs); | 40 | +/* |
40 | + aio_context_release(ctx); | 41 | + * Mark and check that the function is part of the I/O API. |
41 | + } | 42 | + * Please refer to include/block/block-io.h for more |
42 | + g_slist_free(drained); | 43 | + * information about IO API. |
43 | } | 44 | + */ |
44 | 45 | #define IO_CODE() \ | |
45 | void qmp_blockdev_del(const char *node_name, Error **errp) | 46 | do { \ |
47 | /* nop */ \ | ||
48 | } while (0) | ||
49 | |||
50 | -/* Mark and check that the function is part of the "I/O OR GS" API. */ | ||
51 | +/* | ||
52 | + * Mark and check that the function is part of the "I/O OR GS" API. | ||
53 | + * Please refer to include/block/block-io.h for more | ||
54 | + * information about "IO or GS" API. | ||
55 | + */ | ||
56 | #define IO_OR_GS_CODE() \ | ||
57 | do { \ | ||
58 | /* nop */ \ | ||
46 | -- | 59 | -- |
47 | 2.34.1 | 60 | 2.35.3 |
48 | |||
49 | diff view generated by jsdifflib |