iothreads were introduced in qemu-2.0 and can't be compiled out thus we can always assume qemu supports them. Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx> --- src/qemu/qemu_capabilities.c | 2 +- src/qemu/qemu_driver.c | 21 +-------------------- src/qemu/qemu_process.c | 23 ----------------------- 3 files changed, 2 insertions(+), 44 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 3cb5785baa..6ba9b109a5 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -6403,7 +6403,7 @@ struct virQEMUCapsDomainFeatureCapabilityTuple { * capability XML. Use QEMU_CAPS_LAST to always enable a domain feature. * */ static const struct virQEMUCapsDomainFeatureCapabilityTuple domCapsTuples[] = { - { VIR_DOMAIN_CAPS_FEATURE_IOTHREADS, QEMU_CAPS_OBJECT_IOTHREAD }, + { VIR_DOMAIN_CAPS_FEATURE_IOTHREADS, QEMU_CAPS_LAST }, { VIR_DOMAIN_CAPS_FEATURE_VMCOREINFO, QEMU_CAPS_DEVICE_VMCOREINFO }, { VIR_DOMAIN_CAPS_FEATURE_GENID, QEMU_CAPS_DEVICE_VMGENID }, { VIR_DOMAIN_CAPS_FEATURE_BACKING_STORE_INPUT, QEMU_CAPS_LAST }, diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index d00eb1796f..fcec445f14 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -4728,7 +4728,6 @@ static int qemuDomainGetIOThreadsLive(virDomainObj *vm, virDomainIOThreadInfoPtr **info) { - qemuDomainObjPrivate *priv; qemuMonitorIOThreadInfo **iothreads = NULL; virDomainIOThreadInfoPtr *info_ret = NULL; int niothreads = 0; @@ -4744,13 +4743,6 @@ qemuDomainGetIOThreadsLive(virDomainObj *vm, goto endjob; } - priv = vm->privateData; - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_IOTHREAD)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("IOThreads not supported with this binary")); - goto endjob; - } - if ((ret = qemuDomainGetIOThreadsMon(vm, &iothreads, &niothreads)) < 0) goto endjob; @@ -5428,12 +5420,6 @@ qemuDomainChgIOThread(virQEMUDriver *driver, } if (def) { - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_IOTHREAD)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("IOThreads not supported with this binary")); - goto endjob; - } - switch (action) { case VIR_DOMAIN_IOTHREAD_ACTION_ADD: if (virDomainDriverAddIOThreadCheck(def, iothread.iothread_id) < 0) @@ -18395,11 +18381,6 @@ struct qemuDomainGetStatsWorker { }; -static virQEMUCapsFlags queryIOThreadRequired[] = { - QEMU_CAPS_OBJECT_IOTHREAD, - QEMU_CAPS_LAST -}; - static virQEMUCapsFlags queryDirtyRateRequired[] = { QEMU_CAPS_QUERY_DIRTY_RATE, QEMU_CAPS_LAST @@ -18418,7 +18399,7 @@ static struct qemuDomainGetStatsWorker qemuDomainGetStatsWorkers[] = { { qemuDomainGetStatsInterface, VIR_DOMAIN_STATS_INTERFACE, false, NULL }, { qemuDomainGetStatsBlock, VIR_DOMAIN_STATS_BLOCK, true, NULL }, { qemuDomainGetStatsPerf, VIR_DOMAIN_STATS_PERF, false, NULL }, - { qemuDomainGetStatsIOThread, VIR_DOMAIN_STATS_IOTHREAD, true, queryIOThreadRequired }, + { qemuDomainGetStatsIOThread, VIR_DOMAIN_STATS_IOTHREAD, true, NULL }, { qemuDomainGetStatsMemory, VIR_DOMAIN_STATS_MEMORY, false, NULL }, { qemuDomainGetStatsDirtyRate, VIR_DOMAIN_STATS_DIRTYRATE, true, queryDirtyRateRequired }, { qemuDomainGetStatsVm, VIR_DOMAIN_STATS_VM, true, queryVmRequired }, diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 63d7e1138d..678a8f52f4 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -2350,11 +2350,6 @@ qemuProcessDetectIOThreadPIDs(virDomainObj *vm, int ret = -1; size_t i; - if (!virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_OBJECT_IOTHREAD)) { - ret = 0; - goto cleanup; - } - /* Get the list of IOThreads from qemu */ if (qemuDomainObjEnterMonitorAsync(vm, asyncJob) < 0) goto cleanup; @@ -5365,21 +5360,6 @@ qemuProcessStartValidateGraphics(virDomainObj *vm) } -static int -qemuProcessStartValidateIOThreads(virDomainObj *vm, - virQEMUCaps *qemuCaps) -{ - if (vm->def->niothreadids > 0 && - !virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_IOTHREAD)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", - _("IOThreads not supported for this QEMU")); - return -1; - } - - return 0; -} - - static int qemuProcessStartValidateShmem(virDomainObj *vm) { @@ -5554,9 +5534,6 @@ qemuProcessStartValidate(virQEMUDriver *driver, if (qemuProcessStartValidateGraphics(vm) < 0) return -1; - if (qemuProcessStartValidateIOThreads(vm, qemuCaps) < 0) - return -1; - if (qemuProcessStartValidateShmem(vm) < 0) return -1; -- 2.39.2