1 | The following changes since commit 8f2d7c341184a95d05476ea3c45dbae2b9ddbe51: | 1 | The following changes since commit b0ca999a43a22b38158a222233d3f5881648bb4f: |
---|---|---|---|
2 | 2 | ||
3 | Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-02-27-1' into staging (2017-02-27 15:33:21 +0000) | 3 | Update version for v4.2.0 release (2019-12-12 16:45:57 +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/codyprime/qemu-kvm-jtc.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 51654aa52a94612edfaf76dcb51c0a0b7821c90d: | 9 | for you to fetch changes up to 86d2a49b41832355ab50cf60cec0cd50680fc0e5: |
10 | 10 | ||
11 | iscsi: add missing colons to the qapi docs (2017-02-27 23:33:41 -0500) | 11 | iothread: document -object iothread on man page (2019-12-13 11:24:07 +0000) |
12 | 12 | ||
13 | ---------------------------------------------------------------- | 13 | ---------------------------------------------------------------- |
14 | Block patches for 2.9 | 14 | Pull request |
15 | |||
15 | ---------------------------------------------------------------- | 16 | ---------------------------------------------------------------- |
16 | 17 | ||
17 | Jeff Cody (1): | 18 | Evgeny Yakovlev (1): |
18 | iscsi: add missing colons to the qapi docs | 19 | virtio-blk: advertise F_WCE (F_FLUSH) if F_CONFIG_WCE is advertised |
19 | 20 | ||
20 | John Snow (1): | 21 | Stefan Hajnoczi (1): |
21 | block/mirror: fix broken sparseness detection | 22 | iothread: document -object iothread on man page |
22 | 23 | ||
23 | block/mirror.c | 2 +- | 24 | hw/arm/virt.c | 1 + |
24 | qapi/block-core.json | 18 +++++++++--------- | 25 | hw/block/virtio-blk.c | 6 +++++- |
25 | 2 files changed, 10 insertions(+), 10 deletions(-) | 26 | hw/core/machine.c | 5 +++++ |
27 | hw/i386/pc_piix.c | 1 + | ||
28 | hw/i386/pc_q35.c | 1 + | ||
29 | hw/ppc/spapr.c | 2 +- | ||
30 | hw/s390x/s390-virtio-ccw.c | 1 + | ||
31 | include/hw/boards.h | 3 +++ | ||
32 | include/hw/virtio/virtio-blk.h | 1 + | ||
33 | qemu-options.hx | 38 ++++++++++++++++++++++++++++++++++ | ||
34 | 10 files changed, 57 insertions(+), 2 deletions(-) | ||
26 | 35 | ||
27 | -- | 36 | -- |
28 | 2.9.3 | 37 | 2.23.0 |
29 | 38 | ||
30 | 39 | diff view generated by jsdifflib |
1 | The missing colons make the iscsi part of the documentation not render | 1 | From: Evgeny Yakovlev <wrfsh@yandex-team.ru> |
---|---|---|---|
2 | quite as nicely, so add those in. | ||
3 | 2 | ||
4 | Signed-off-by: Jeff Cody <jcody@redhat.com> | 3 | Virtio spec 1.1 (and earlier), 5.2.5.2 Driver Requirements: Device |
4 | Initialization: | ||
5 | |||
6 | "Devices SHOULD always offer VIRTIO_BLK_F_FLUSH, and MUST offer it if | ||
7 | they offer VIRTIO_BLK_F_CONFIG_WCE" | ||
8 | |||
9 | Currently F_CONFIG_WCE and F_WCE are not connected to each other. | ||
10 | Qemu will advertise F_CONFIG_WCE if config-wce argument is | ||
11 | set for virtio-blk device. And F_WCE is advertised only if | ||
12 | underlying block backend actually has it's caching enabled. | ||
13 | |||
14 | Fix this by advertising F_WCE if F_CONFIG_WCE is also advertised. | ||
15 | |||
16 | To preserve backwards compatibility with newer machine types make this | ||
17 | behaviour governed by "x-enable-wce-if-config-wce" virtio-blk-device | ||
18 | property and introduce hw_compat_4_2 with new property being off by | ||
19 | default for all machine types <= 4.2 (but don't introduce 4.3 | ||
20 | machine type itself yet). | ||
21 | |||
22 | Signed-off-by: Evgeny Yakovlev <wrfsh@yandex-team.ru> | ||
23 | Message-Id: <1572978137-189218-1-git-send-email-wrfsh@yandex-team.ru> | ||
24 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
5 | --- | 25 | --- |
6 | qapi/block-core.json | 18 +++++++++--------- | 26 | hw/arm/virt.c | 1 + |
7 | 1 file changed, 9 insertions(+), 9 deletions(-) | 27 | hw/block/virtio-blk.c | 6 +++++- |
28 | hw/core/machine.c | 5 +++++ | ||
29 | hw/i386/pc_piix.c | 1 + | ||
30 | hw/i386/pc_q35.c | 1 + | ||
31 | hw/ppc/spapr.c | 2 +- | ||
32 | hw/s390x/s390-virtio-ccw.c | 1 + | ||
33 | include/hw/boards.h | 3 +++ | ||
34 | include/hw/virtio/virtio-blk.h | 1 + | ||
35 | 9 files changed, 19 insertions(+), 2 deletions(-) | ||
8 | 36 | ||
9 | diff --git a/qapi/block-core.json b/qapi/block-core.json | 37 | diff --git a/hw/arm/virt.c b/hw/arm/virt.c |
10 | index XXXXXXX..XXXXXXX 100644 | 38 | index XXXXXXX..XXXXXXX 100644 |
11 | --- a/qapi/block-core.json | 39 | --- a/hw/arm/virt.c |
12 | +++ b/qapi/block-core.json | 40 | +++ b/hw/arm/virt.c |
41 | @@ -XXX,XX +XXX,XX @@ type_init(machvirt_machine_init); | ||
42 | |||
43 | static void virt_machine_4_2_options(MachineClass *mc) | ||
44 | { | ||
45 | + compat_props_add(mc->compat_props, hw_compat_4_2, hw_compat_4_2_len); | ||
46 | } | ||
47 | DEFINE_VIRT_MACHINE_AS_LATEST(4, 2) | ||
48 | |||
49 | diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c | ||
50 | index XXXXXXX..XXXXXXX 100644 | ||
51 | --- a/hw/block/virtio-blk.c | ||
52 | +++ b/hw/block/virtio-blk.c | ||
53 | @@ -XXX,XX +XXX,XX @@ static uint64_t virtio_blk_get_features(VirtIODevice *vdev, uint64_t features, | ||
54 | virtio_add_feature(&features, VIRTIO_BLK_F_SCSI); | ||
55 | } | ||
56 | |||
57 | - if (blk_enable_write_cache(s->blk)) { | ||
58 | + if (blk_enable_write_cache(s->blk) || | ||
59 | + (s->conf.x_enable_wce_if_config_wce && | ||
60 | + virtio_has_feature(features, VIRTIO_BLK_F_CONFIG_WCE))) { | ||
61 | virtio_add_feature(&features, VIRTIO_BLK_F_WCE); | ||
62 | } | ||
63 | if (blk_is_read_only(s->blk)) { | ||
64 | @@ -XXX,XX +XXX,XX @@ static Property virtio_blk_properties[] = { | ||
65 | conf.max_discard_sectors, BDRV_REQUEST_MAX_SECTORS), | ||
66 | DEFINE_PROP_UINT32("max-write-zeroes-sectors", VirtIOBlock, | ||
67 | conf.max_write_zeroes_sectors, BDRV_REQUEST_MAX_SECTORS), | ||
68 | + DEFINE_PROP_BOOL("x-enable-wce-if-config-wce", VirtIOBlock, | ||
69 | + conf.x_enable_wce_if_config_wce, true), | ||
70 | DEFINE_PROP_END_OF_LIST(), | ||
71 | }; | ||
72 | |||
73 | diff --git a/hw/core/machine.c b/hw/core/machine.c | ||
74 | index XXXXXXX..XXXXXXX 100644 | ||
75 | --- a/hw/core/machine.c | ||
76 | +++ b/hw/core/machine.c | ||
13 | @@ -XXX,XX +XXX,XX @@ | 77 | @@ -XXX,XX +XXX,XX @@ |
14 | ## | 78 | #include "hw/pci/pci.h" |
15 | # @BlockdevOptionsIscsi: | 79 | #include "hw/mem/nvdimm.h" |
16 | # | 80 | |
17 | -# @transport The iscsi transport type | 81 | +GlobalProperty hw_compat_4_2[] = { |
18 | +# @transport: The iscsi transport type | 82 | + { "virtio-blk-device", "x-enable-wce-if-config-wce", "off" }, |
19 | # | 83 | +}; |
20 | -# @portal The address of the iscsi portal | 84 | +const size_t hw_compat_4_2_len = G_N_ELEMENTS(hw_compat_4_2); |
21 | +# @portal: The address of the iscsi portal | 85 | + |
22 | # | 86 | GlobalProperty hw_compat_4_1[] = { |
23 | -# @target The target iqn name | 87 | { "virtio-pci", "x-pcie-flr-init", "off" }, |
24 | +# @target: The target iqn name | 88 | }; |
25 | # | 89 | diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c |
26 | -# @lun #optional LUN to connect to. Defaults to 0. | 90 | index XXXXXXX..XXXXXXX 100644 |
27 | +# @lun: #optional LUN to connect to. Defaults to 0. | 91 | --- a/hw/i386/pc_piix.c |
28 | # | 92 | +++ b/hw/i386/pc_piix.c |
29 | -# @user #optional User name to log in with. If omitted, no CHAP | 93 | @@ -XXX,XX +XXX,XX @@ static void pc_i440fx_4_2_machine_options(MachineClass *m) |
30 | +# @user: #optional User name to log in with. If omitted, no CHAP | 94 | m->alias = "pc"; |
31 | # authentication is performed. | 95 | m->is_default = 1; |
32 | # | 96 | pcmc->default_cpu_version = 1; |
33 | -# @password-secret #optional The ID of a QCryptoSecret object providing | 97 | + compat_props_add(m->compat_props, hw_compat_4_2, hw_compat_4_2_len); |
34 | +# @password-secret: #optional The ID of a QCryptoSecret object providing | 98 | } |
35 | # the password for the login. This option is required if | 99 | |
36 | # @user is specified. | 100 | DEFINE_I440FX_MACHINE(v4_2, "pc-i440fx-4.2", NULL, |
37 | # | 101 | diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c |
38 | -# @initiator-name #optional The iqn name we want to identify to the target | 102 | index XXXXXXX..XXXXXXX 100644 |
39 | +# @initiator-name: #optional The iqn name we want to identify to the target | 103 | --- a/hw/i386/pc_q35.c |
40 | # as. If this option is not specified, an initiator name is | 104 | +++ b/hw/i386/pc_q35.c |
41 | # generated automatically. | 105 | @@ -XXX,XX +XXX,XX @@ static void pc_q35_4_2_machine_options(MachineClass *m) |
42 | # | 106 | pc_q35_machine_options(m); |
43 | -# @header-digest #optional The desired header digest. Defaults to | 107 | m->alias = "q35"; |
44 | +# @header-digest: #optional The desired header digest. Defaults to | 108 | pcmc->default_cpu_version = 1; |
45 | # none-crc32c. | 109 | + compat_props_add(m->compat_props, hw_compat_4_2, hw_compat_4_2_len); |
46 | # | 110 | } |
47 | -# @timeout #optional Timeout in seconds after which a request will | 111 | |
48 | +# @timeout: #optional Timeout in seconds after which a request will | 112 | DEFINE_Q35_MACHINE(v4_2, "pc-q35-4.2", NULL, |
49 | # timeout. 0 means no timeout and is the default. | 113 | diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c |
50 | # | 114 | index XXXXXXX..XXXXXXX 100644 |
51 | # Driver specific block device options for iscsi | 115 | --- a/hw/ppc/spapr.c |
116 | +++ b/hw/ppc/spapr.c | ||
117 | @@ -XXX,XX +XXX,XX @@ static const TypeInfo spapr_machine_info = { | ||
118 | */ | ||
119 | static void spapr_machine_4_2_class_options(MachineClass *mc) | ||
120 | { | ||
121 | - /* Defaults for the latest behaviour inherited from the base class */ | ||
122 | + compat_props_add(mc->compat_props, hw_compat_4_2, hw_compat_4_2_len); | ||
123 | } | ||
124 | |||
125 | DEFINE_SPAPR_MACHINE(4_2, "4.2", true); | ||
126 | diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c | ||
127 | index XXXXXXX..XXXXXXX 100644 | ||
128 | --- a/hw/s390x/s390-virtio-ccw.c | ||
129 | +++ b/hw/s390x/s390-virtio-ccw.c | ||
130 | @@ -XXX,XX +XXX,XX @@ static void ccw_machine_4_2_instance_options(MachineState *machine) | ||
131 | |||
132 | static void ccw_machine_4_2_class_options(MachineClass *mc) | ||
133 | { | ||
134 | + compat_props_add(mc->compat_props, hw_compat_4_2, hw_compat_4_2_len); | ||
135 | } | ||
136 | DEFINE_CCW_MACHINE(4_2, "4.2", true); | ||
137 | |||
138 | diff --git a/include/hw/boards.h b/include/hw/boards.h | ||
139 | index XXXXXXX..XXXXXXX 100644 | ||
140 | --- a/include/hw/boards.h | ||
141 | +++ b/include/hw/boards.h | ||
142 | @@ -XXX,XX +XXX,XX @@ struct MachineState { | ||
143 | } \ | ||
144 | type_init(machine_initfn##_register_types) | ||
145 | |||
146 | +extern GlobalProperty hw_compat_4_2[]; | ||
147 | +extern const size_t hw_compat_4_2_len; | ||
148 | + | ||
149 | extern GlobalProperty hw_compat_4_1[]; | ||
150 | extern const size_t hw_compat_4_1_len; | ||
151 | |||
152 | diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h | ||
153 | index XXXXXXX..XXXXXXX 100644 | ||
154 | --- a/include/hw/virtio/virtio-blk.h | ||
155 | +++ b/include/hw/virtio/virtio-blk.h | ||
156 | @@ -XXX,XX +XXX,XX @@ struct VirtIOBlkConf | ||
157 | uint16_t queue_size; | ||
158 | uint32_t max_discard_sectors; | ||
159 | uint32_t max_write_zeroes_sectors; | ||
160 | + bool x_enable_wce_if_config_wce; | ||
161 | }; | ||
162 | |||
163 | struct VirtIOBlockDataPlane; | ||
52 | -- | 164 | -- |
53 | 2.9.3 | 165 | 2.23.0 |
54 | 166 | ||
55 | 167 | diff view generated by jsdifflib |
1 | From: John Snow <jsnow@redhat.com> | 1 | Add -object iothread documentation to the man page, including references |
---|---|---|---|
2 | to the query-iothread QMP command and qom-set syntax for adjusting | ||
3 | adaptive polling parameters at run-time. | ||
2 | 4 | ||
3 | int64_t is in all likelihood the actual scalar type we want. | 5 | Reported-by: Zhenyu Ye <yezhenyu2@huawei.com> |
4 | Yep, really. | 6 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> |
7 | Message-id: 20191025122236.29815-1-stefanha@redhat.com | ||
8 | Message-Id: <20191025122236.29815-1-stefanha@redhat.com> | ||
9 | Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> | ||
10 | --- | ||
11 | qemu-options.hx | 38 ++++++++++++++++++++++++++++++++++++++ | ||
12 | 1 file changed, 38 insertions(+) | ||
5 | 13 | ||
6 | Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1219541 | 14 | diff --git a/qemu-options.hx b/qemu-options.hx |
7 | |||
8 | Signed-off-by: John Snow <jsnow@redhat.com> | ||
9 | Reviewed-by: Jeff Cody <jcody@redhat.com> | ||
10 | Signed-off-by: Jeff Cody <jcody@redhat.com> | ||
11 | --- | ||
12 | block/mirror.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/block/mirror.c b/block/mirror.c | ||
16 | index XXXXXXX..XXXXXXX 100644 | 15 | index XXXXXXX..XXXXXXX 100644 |
17 | --- a/block/mirror.c | 16 | --- a/qemu-options.hx |
18 | +++ b/block/mirror.c | 17 | +++ b/qemu-options.hx |
19 | @@ -XXX,XX +XXX,XX @@ static uint64_t coroutine_fn mirror_iteration(MirrorBlockJob *s) | 18 | @@ -XXX,XX +XXX,XX @@ access |
20 | nb_chunks * sectors_per_chunk); | 19 | CN=laptop.example.com,O=Example Home,L=London,ST=London,C=GB |
21 | bitmap_set(s->in_flight_bitmap, sector_num / sectors_per_chunk, nb_chunks); | 20 | @end example |
22 | while (nb_chunks > 0 && sector_num < end) { | 21 | |
23 | - int ret; | 22 | +@item -object iothread,id=@var{id},poll-max-ns=@var{poll-max-ns},poll-grow=@var{poll-grow},poll-shrink=@var{poll-shrink} |
24 | + int64_t ret; | 23 | + |
25 | int io_sectors, io_sectors_acct; | 24 | +Creates a dedicated event loop thread that devices can be assigned to. This is |
26 | BlockDriverState *file; | 25 | +known as an IOThread. By default device emulation happens in vCPU threads or |
27 | enum MirrorMethod { | 26 | +the main event loop thread. This can become a scalability bottleneck. |
27 | +IOThreads allow device emulation and I/O to run on other host CPUs. | ||
28 | + | ||
29 | +The @option{id} parameter is a unique ID that will be used to reference this | ||
30 | +IOThread from @option{-device ...,iothread=@var{id}}. Multiple devices can be | ||
31 | +assigned to an IOThread. Note that not all devices support an | ||
32 | +@option{iothread} parameter. | ||
33 | + | ||
34 | +The @code{query-iothreads} QMP command lists IOThreads and reports their thread | ||
35 | +IDs so that the user can configure host CPU pinning/affinity. | ||
36 | + | ||
37 | +IOThreads use an adaptive polling algorithm to reduce event loop latency. | ||
38 | +Instead of entering a blocking system call to monitor file descriptors and then | ||
39 | +pay the cost of being woken up when an event occurs, the polling algorithm | ||
40 | +spins waiting for events for a short time. The algorithm's default parameters | ||
41 | +are suitable for many cases but can be adjusted based on knowledge of the | ||
42 | +workload and/or host device latency. | ||
43 | + | ||
44 | +The @option{poll-max-ns} parameter is the maximum number of nanoseconds to busy | ||
45 | +wait for events. Polling can be disabled by setting this value to 0. | ||
46 | + | ||
47 | +The @option{poll-grow} parameter is the multiplier used to increase the polling | ||
48 | +time when the algorithm detects it is missing events due to not polling long | ||
49 | +enough. | ||
50 | + | ||
51 | +The @option{poll-shrink} parameter is the divisor used to decrease the polling | ||
52 | +time when the algorithm detects it is spending too long polling without | ||
53 | +encountering events. | ||
54 | + | ||
55 | +The polling parameters can be modified at run-time using the @code{qom-set} command (where @code{iothread1} is the IOThread's @code{id}): | ||
56 | + | ||
57 | +@example | ||
58 | +(qemu) qom-set /objects/iothread1 poll-max-ns 100000 | ||
59 | +@end example | ||
60 | |||
61 | @end table | ||
62 | |||
28 | -- | 63 | -- |
29 | 2.9.3 | 64 | 2.23.0 |
30 | 65 | ||
31 | 66 | diff view generated by jsdifflib |