qemu: perf: Don't set state of first event for every other event

A bug in the code used the value of the first perf event as state for
all the mentioned one rather than extracting individual ones.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1346730
This commit is contained in:
Peter Krempa 2016-06-15 16:07:20 +02:00
parent e33cd67a9b
commit da8285c44a
1 changed files with 2 additions and 2 deletions

View File

@ -9750,7 +9750,7 @@ qemuDomainSetPerfEvents(virDomainPtr dom,
if (def) {
for (i = 0; i < nparams; i++) {
virTypedParameterPtr param = &params[i];
enabled = params->value.b;
enabled = param->value.b;
type = virPerfEventTypeFromString(param->field);
if (!enabled && virPerfEventDisable(priv->perf, type) < 0)
@ -9769,7 +9769,7 @@ qemuDomainSetPerfEvents(virDomainPtr dom,
if (persistentDef) {
for (i = 0; i < nparams; i++) {
virTypedParameterPtr param = &params[i];
enabled = params->value.b;
enabled = param->value.b;
type = virPerfEventTypeFromString(param->field);
persistentDef->perf->events[type] = enabled ?