libvirt/SOURCES/libvirt-qemu-pass-virDomainObjPtr-to-qemuExtDevicesSetupCgroup.patch
2021-09-10 11:58:15 +00:00

67 lines
2.5 KiB
Diff

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