|
|
d76c62 |
From 745aed1c66fcde8c8bf14d67622f02a838dd7ae2 Mon Sep 17 00:00:00 2001
|
|
|
d76c62 |
Message-Id: <745aed1c66fcde8c8bf14d67622f02a838dd7ae2@dist-git>
|
|
|
d76c62 |
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
|
|
d76c62 |
Date: Wed, 4 Mar 2020 12:42:37 +0100
|
|
|
d76c62 |
Subject: [PATCH] qemu: pass virDomainObjPtr to qemuExtDevicesSetupCgroup
|
|
|
d76c62 |
MIME-Version: 1.0
|
|
|
d76c62 |
Content-Type: text/plain; charset=UTF-8
|
|
|
d76c62 |
Content-Transfer-Encoding: 8bit
|
|
|
d76c62 |
|
|
|
d76c62 |
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
|
|
|
d76c62 |
Tested-by: Andrea Bolognani <abologna@redhat.com>
|
|
|
d76c62 |
(cherry picked from commit 6baf97ef2c7416f3d81bdc6cf20f121b62c8fd4f)
|
|
|
d76c62 |
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
|
|
d76c62 |
https://bugzilla.redhat.com/show_bug.cgi?id=1694166
|
|
|
d76c62 |
Message-Id: <fcb334eecdc7d85740f1aa5f7cd9f3d151996f99.1583322090.git.jtomko@redhat.com>
|
|
|
d76c62 |
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
|
|
|
d76c62 |
---
|
|
|
d76c62 |
src/qemu/qemu_cgroup.c | 2 +-
|
|
|
d76c62 |
src/qemu/qemu_extdevice.c | 3 ++-
|
|
|
d76c62 |
src/qemu/qemu_extdevice.h | 2 +-
|
|
|
d76c62 |
3 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
d76c62 |
|
|
|
d76c62 |
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
|
|
|
d76c62 |
index 45701b4c6e..57a1231855 100644
|
|
|
d76c62 |
--- a/src/qemu/qemu_cgroup.c
|
|
|
d76c62 |
+++ b/src/qemu/qemu_cgroup.c
|
|
|
d76c62 |
@@ -1262,7 +1262,7 @@ qemuSetupCgroupForExtDevices(virDomainObjPtr vm,
|
|
|
d76c62 |
false, &cgroup_temp) < 0)
|
|
|
d76c62 |
goto cleanup;
|
|
|
d76c62 |
|
|
|
d76c62 |
- ret = qemuExtDevicesSetupCgroup(driver, vm->def, cgroup_temp);
|
|
|
d76c62 |
+ ret = qemuExtDevicesSetupCgroup(driver, vm, cgroup_temp);
|
|
|
d76c62 |
|
|
|
d76c62 |
cleanup:
|
|
|
d76c62 |
virCgroupFree(&cgroup_temp);
|
|
|
d76c62 |
diff --git a/src/qemu/qemu_extdevice.c b/src/qemu/qemu_extdevice.c
|
|
|
d76c62 |
index 7f3bb104d9..bb73787b8d 100644
|
|
|
d76c62 |
--- a/src/qemu/qemu_extdevice.c
|
|
|
d76c62 |
+++ b/src/qemu/qemu_extdevice.c
|
|
|
d76c62 |
@@ -236,9 +236,10 @@ qemuExtDevicesHasDevice(virDomainDefPtr def)
|
|
|
d76c62 |
|
|
|
d76c62 |
int
|
|
|
d76c62 |
qemuExtDevicesSetupCgroup(virQEMUDriverPtr driver,
|
|
|
d76c62 |
- virDomainDefPtr def,
|
|
|
d76c62 |
+ virDomainObjPtr vm,
|
|
|
d76c62 |
virCgroupPtr cgroup)
|
|
|
d76c62 |
{
|
|
|
d76c62 |
+ virDomainDefPtr def = vm->def;
|
|
|
d76c62 |
size_t i;
|
|
|
d76c62 |
|
|
|
d76c62 |
for (i = 0; i < def->nvideos; i++) {
|
|
|
d76c62 |
diff --git a/src/qemu/qemu_extdevice.h b/src/qemu/qemu_extdevice.h
|
|
|
d76c62 |
index df29968e16..49373a15a1 100644
|
|
|
d76c62 |
--- a/src/qemu/qemu_extdevice.h
|
|
|
d76c62 |
+++ b/src/qemu/qemu_extdevice.h
|
|
|
d76c62 |
@@ -58,5 +58,5 @@ void qemuExtDevicesStop(virQEMUDriverPtr driver,
|
|
|
d76c62 |
bool qemuExtDevicesHasDevice(virDomainDefPtr def);
|
|
|
d76c62 |
|
|
|
d76c62 |
int qemuExtDevicesSetupCgroup(virQEMUDriverPtr driver,
|
|
|
d76c62 |
- virDomainDefPtr def,
|
|
|
d76c62 |
+ virDomainObjPtr vm,
|
|
|
d76c62 |
virCgroupPtr cgroup);
|
|
|
d76c62 |
--
|
|
|
d76c62 |
2.25.1
|
|
|
d76c62 |
|