It will be used later.
Signed-off-by: Martin Kletzander <mkletzan(a)redhat.com>
---
src/qemu/qemu_driver.c | 4 ++--
src/qemu/qemu_process.c | 34 ++++++++++++++++++++--------------
src/qemu/qemu_process.h | 6 ++++--
3 files changed, 26 insertions(+), 18 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index f9a3b1522391..9a476b838f39 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -4642,7 +4642,7 @@ qemuDomainHotplugAddVcpu(virQEMUDriverPtr driver,
goto cleanup;
}
- if (qemuProcessSetupVcpu(vm, vcpu) < 0)
+ if (qemuProcessSetupVcpu(driver, vm, vcpu) < 0)
goto cleanup;
ret = 0;
@@ -5768,7 +5768,7 @@ qemuDomainHotplugAddIOThread(virQEMUDriverPtr driver,
iothrid->thread_id = new_iothreads[idx]->thread_id;
- if (qemuProcessSetupIOThread(vm, iothrid) < 0)
+ if (qemuProcessSetupIOThread(driver, vm, iothrid) < 0)
goto cleanup;
ret = 0;
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index d329f6dd3ac6..0aab01fd4d50 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -2315,7 +2315,8 @@ qemuProcessSetLinkStates(virQEMUDriverPtr driver,
* Returns 0 on success, -1 on error.
*/
static int
-qemuProcessSetupPid(virDomainObjPtr vm,
+qemuProcessSetupPid(virQEMUDriverPtr driver ATTRIBUTE_UNUSED,
+ virDomainObjPtr vm,
pid_t pid,
virCgroupThreadName nameval,
int id,
@@ -2413,9 +2414,10 @@ qemuProcessSetupPid(virDomainObjPtr vm,
static int
-qemuProcessSetupEmulator(virDomainObjPtr vm)
+qemuProcessSetupEmulator(virQEMUDriverPtr driver,
+ virDomainObjPtr vm)
{
- return qemuProcessSetupPid(vm, vm->pid, VIR_CGROUP_THREAD_EMULATOR,
+ return qemuProcessSetupPid(driver, vm, vm->pid, VIR_CGROUP_THREAD_EMULATOR,
0, vm->def->cputune.emulatorpin,
vm->def->cputune.emulator_period,
vm->def->cputune.emulator_quota,
@@ -4622,13 +4624,14 @@ qemuProcessNetworkPrepareDevices(virDomainDefPtr def)
* Returns 0 on success, -1 on error.
*/
int
-qemuProcessSetupVcpu(virDomainObjPtr vm,
+qemuProcessSetupVcpu(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
unsigned int vcpuid)
{
pid_t vcpupid = qemuDomainGetVcpuPid(vm, vcpuid);
virDomainVcpuInfoPtr vcpu = virDomainDefGetVcpu(vm->def, vcpuid);
- return qemuProcessSetupPid(vm, vcpupid, VIR_CGROUP_THREAD_VCPU,
+ return qemuProcessSetupPid(driver, vm, vcpupid, VIR_CGROUP_THREAD_VCPU,
vcpuid, vcpu->cpumask,
vm->def->cputune.period,
vm->def->cputune.quota,
@@ -4637,7 +4640,8 @@ qemuProcessSetupVcpu(virDomainObjPtr vm,
static int
-qemuProcessSetupVcpus(virDomainObjPtr vm)
+qemuProcessSetupVcpus(virQEMUDriverPtr driver,
+ virDomainObjPtr vm)
{
virDomainVcpuInfoPtr vcpu;
unsigned int maxvcpus = virDomainDefGetVcpusMax(vm->def);
@@ -4677,7 +4681,7 @@ qemuProcessSetupVcpus(virDomainObjPtr vm)
if (!vcpu->online)
continue;
- if (qemuProcessSetupVcpu(vm, i) < 0)
+ if (qemuProcessSetupVcpu(driver, vm, i) < 0)
return -1;
}
@@ -4686,11 +4690,12 @@ qemuProcessSetupVcpus(virDomainObjPtr vm)
int
-qemuProcessSetupIOThread(virDomainObjPtr vm,
+qemuProcessSetupIOThread(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
virDomainIOThreadIDDefPtr iothread)
{
- return qemuProcessSetupPid(vm, iothread->thread_id,
+ return qemuProcessSetupPid(driver, vm, iothread->thread_id,
VIR_CGROUP_THREAD_IOTHREAD,
iothread->iothread_id,
iothread->cpumask,
@@ -4701,14 +4706,15 @@ qemuProcessSetupIOThread(virDomainObjPtr vm,
static int
-qemuProcessSetupIOThreads(virDomainObjPtr vm)
+qemuProcessSetupIOThreads(virQEMUDriverPtr driver,
+ virDomainObjPtr vm)
{
size_t i;
for (i = 0; i < vm->def->niothreadids; i++) {
virDomainIOThreadIDDefPtr info = vm->def->iothreadids[i];
- if (qemuProcessSetupIOThread(vm, info) < 0)
+ if (qemuProcessSetupIOThread(driver, vm, info) < 0)
return -1;
}
@@ -5134,7 +5140,7 @@ qemuProcessLaunch(virConnectPtr conn,
goto cleanup;
VIR_DEBUG("Setting emulator tuning/settings");
- if (qemuProcessSetupEmulator(vm) < 0)
+ if (qemuProcessSetupEmulator(driver, vm) < 0)
goto cleanup;
VIR_DEBUG("Setting domain security labels");
@@ -5215,11 +5221,11 @@ qemuProcessLaunch(virConnectPtr conn,
goto cleanup;
VIR_DEBUG("Setting vCPU tuning/settings");
- if (qemuProcessSetupVcpus(vm) < 0)
+ if (qemuProcessSetupVcpus(driver, vm) < 0)
goto cleanup;
VIR_DEBUG("Setting IOThread tuning/settings");
- if (qemuProcessSetupIOThreads(vm) < 0)
+ if (qemuProcessSetupIOThreads(driver, vm) < 0)
goto cleanup;
VIR_DEBUG("Setting any required VM passwords");
diff --git a/src/qemu/qemu_process.h b/src/qemu/qemu_process.h
index 21f3b0ccaa3c..6ada8cadd8b7 100644
--- a/src/qemu/qemu_process.h
+++ b/src/qemu/qemu_process.h
@@ -174,9 +174,11 @@ virDomainDiskDefPtr qemuProcessFindDomainDiskByAlias(virDomainObjPtr
vm,
int qemuConnectAgent(virQEMUDriverPtr driver, virDomainObjPtr vm);
-int qemuProcessSetupVcpu(virDomainObjPtr vm,
+int qemuProcessSetupVcpu(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
unsigned int vcpuid);
-int qemuProcessSetupIOThread(virDomainObjPtr vm,
+int qemuProcessSetupIOThread(virQEMUDriverPtr driver,
+ virDomainObjPtr vm,
virDomainIOThreadIDDefPtr iothread);
int qemuRefreshVirtioChannelState(virQEMUDriverPtr driver,
--
2.9.0