QEMU accepts even values bigger than INT_MAX. The reasoning for these checks was that the QAPI definition declares them as 'int', but in QAPI terms that's any number as it's JSON. Remove the validation as well as the comment missintepreting the QAPI definiton. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_driver.c | 21 --------------------- src/qemu/qemu_monitor_json.c | 7 ------- 2 files changed, 28 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d47c1883f0..23646b7289 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -5234,27 +5234,6 @@ qemuDomainIOThreadParseParams(virTypedParameterPtr params, if (rc == 1) iothread->set_thread_pool_max = true; - if (iothread->set_poll_max_ns && iothread->poll_max_ns > INT_MAX) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("poll-max-ns (%1$llu) must be less than or equal to %2$d"), - iothread->poll_max_ns, INT_MAX); - return -1; - } - - if (iothread->set_poll_grow && iothread->poll_grow > INT_MAX) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("poll-grow (%1$u) must be less than or equal to %2$d"), - iothread->poll_grow, INT_MAX); - return -1; - } - - if (iothread->set_poll_shrink && iothread->poll_shrink > INT_MAX) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("poll-shrink (%1$u) must be less than or equal to %2$d"), - iothread->poll_shrink, INT_MAX); - return -1; - } - if (iothread->set_thread_pool_min && iothread->thread_pool_min < -1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("thread_pool_min (%1$d) must be equal to or greater than -1"), diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index b2c0b20a11..3454e85e43 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -7128,13 +7128,6 @@ qemuMonitorJSONGetIOThreads(qemuMonitor *mon, goto cleanup; } - /* Fetch poll values (since QEMU 2.9 ) if available. QEMU - * stores these values as int64_t's; however, the qapi type - * is an int. The qapi/misc.json also mis-describes the grow - * and shrink values as pure add/remove values. The source - * util/aio-posix.c function aio_poll uses them as a factor - * or divisor in it's calculation. We will fetch and store - * them as defined in our structures. */ if (virJSONValueObjectGetNumberUlong(child, "poll-max-ns", &info->poll_max_ns) == 0 && virJSONValueObjectGetNumberUint(child, "poll-grow", -- 2.39.2