mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: Always assume support for iothreads
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@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
aa0619f79d
commit
bd9ee45f0e
@ -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 },
|
||||
|
@ -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)
|
||||
@ -18393,11 +18379,6 @@ struct qemuDomainGetStatsWorker {
|
||||
};
|
||||
|
||||
|
||||
static virQEMUCapsFlags queryIOThreadRequired[] = {
|
||||
QEMU_CAPS_OBJECT_IOTHREAD,
|
||||
QEMU_CAPS_LAST
|
||||
};
|
||||
|
||||
static virQEMUCapsFlags queryDirtyRateRequired[] = {
|
||||
QEMU_CAPS_QUERY_DIRTY_RATE,
|
||||
QEMU_CAPS_LAST
|
||||
@ -18416,7 +18397,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 },
|
||||
|
@ -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;
|
||||
@ -5364,21 +5359,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)
|
||||
{
|
||||
@ -5553,9 +5533,6 @@ qemuProcessStartValidate(virQEMUDriver *driver,
|
||||
if (qemuProcessStartValidateGraphics(vm) < 0)
|
||||
return -1;
|
||||
|
||||
if (qemuProcessStartValidateIOThreads(vm, qemuCaps) < 0)
|
||||
return -1;
|
||||
|
||||
if (qemuProcessStartValidateShmem(vm) < 0)
|
||||
return -1;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user