SHA256
1
0
forked from pool/libvirt
libvirt/0471637d-cgroups-vcpu-bw.patch
James Fehlig 8806eb20b1 - fix leak after listing all volumes - CVE-2013-1962
ca697e90-CVE-2013-1962.patch
  bnc#820397
- Fix iohelper usage with streams opened for read
  a2214c52-iohelper.patch
- Cope with missing swap cgroup controls
  f493d83f-cgroup-swap-control.patch
  bnc#819976
- Fix cgroup handling when setting VCPU BW
  0471637d-cgroups-vcpu-bw.patch
  rhb#963592
- Escape a leading '.' with '_' in the cgroup names
  0ced83dc-cgroup-escape-dot.patch
- Add missing documentation on new cgroup layout
  486a86eb-cgroups-docs.patch
- Another fix related to systems with no cgroups
  c2cf5f1c-no-cgroups-fix.patch
  bnc#819963

OBS-URL: https://build.opensuse.org/package/show/Virtualization/libvirt?expand=0&rev=264
2013-05-18 15:17:46 +00:00

64 lines
2.9 KiB
Diff

commit 0471637d5628106d058f0eb5516ffa7d5285cc6f
Author: Martin Kletzander <mkletzan@redhat.com>
Date: Thu May 16 14:37:54 2013 +0200
qemu: Fix cgroup handling when setting VCPU BW
Commit 632f78c introduced a regression which causes schedinfo being
unable to set some parameters. When migrating to priv->cgroup there
was missing variable left out and due to passed NULL to underlying
function, the setting failed.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=963592
Index: libvirt-1.0.5/src/qemu/qemu_driver.c
===================================================================
--- libvirt-1.0.5.orig/src/qemu/qemu_driver.c
+++ libvirt-1.0.5/src/qemu/qemu_driver.c
@@ -7721,7 +7721,6 @@ qemuDomainSetSchedulerParametersFlags(vi
{
virQEMUDriverPtr driver = dom->conn->privateData;
int i;
- virCgroupPtr group = NULL;
virDomainObjPtr vm = NULL;
virDomainDefPtr vmdef = NULL;
unsigned long long value_ul;
@@ -7799,7 +7798,7 @@ qemuDomainSetSchedulerParametersFlags(vi
QEMU_SCHED_MIN_PERIOD, QEMU_SCHED_MAX_PERIOD);
if (flags & VIR_DOMAIN_AFFECT_LIVE && value_ul) {
- if ((rc = qemuSetVcpusBWLive(vm, group, value_ul, 0)))
+ if ((rc = qemuSetVcpusBWLive(vm, priv->cgroup, value_ul, 0)))
goto cleanup;
vm->def->cputune.period = value_ul;
@@ -7813,7 +7812,7 @@ qemuDomainSetSchedulerParametersFlags(vi
QEMU_SCHED_MIN_QUOTA, QEMU_SCHED_MAX_QUOTA);
if (flags & VIR_DOMAIN_AFFECT_LIVE && value_l) {
- if ((rc = qemuSetVcpusBWLive(vm, group, 0, value_l)))
+ if ((rc = qemuSetVcpusBWLive(vm, priv->cgroup, 0, value_l)))
goto cleanup;
vm->def->cputune.quota = value_l;
@@ -7827,7 +7826,8 @@ qemuDomainSetSchedulerParametersFlags(vi
QEMU_SCHED_MIN_PERIOD, QEMU_SCHED_MAX_PERIOD);
if (flags & VIR_DOMAIN_AFFECT_LIVE && value_ul) {
- if ((rc = qemuSetEmulatorBandwidthLive(vm, group, value_ul, 0)))
+ if ((rc = qemuSetEmulatorBandwidthLive(vm, priv->cgroup,
+ value_ul, 0)))
goto cleanup;
vm->def->cputune.emulator_period = value_ul;
@@ -7841,7 +7841,8 @@ qemuDomainSetSchedulerParametersFlags(vi
QEMU_SCHED_MIN_QUOTA, QEMU_SCHED_MAX_QUOTA);
if (flags & VIR_DOMAIN_AFFECT_LIVE && value_l) {
- if ((rc = qemuSetEmulatorBandwidthLive(vm, group, 0, value_l)))
+ if ((rc = qemuSetEmulatorBandwidthLive(vm, priv->cgroup,
+ 0, value_l)))
goto cleanup;
vm->def->cputune.emulator_quota = value_l;