Commit 93e9e2d6 authored by Andre Przywara's avatar Andre Przywara Committed by Will Deacon
Browse files

arm: pmu: Improve PMU error reporting

The KVM ioctls mostly just return -1 in the error case, leaving the
actual error code in errno.

Change the output of the PMU error message to actually print this error
code instead of the generic -1.
Signed-off-by: Andre Przywara's avatarAndre Przywara <>
Signed-off-by: default avatarWill Deacon <>
parent e1c7c62a
......@@ -18,7 +18,7 @@ static int set_pmu_attr(struct kvm *kvm, int vcpu_idx,
if (!ret) {
ret = ioctl(fd, KVM_SET_DEVICE_ATTR, attr);
if (ret)
pr_err("PMU KVM_SET_DEVICE_ATTR failed (%d)\n", ret);
perror("PMU KVM_SET_DEVICE_ATTR failed");
} else {
pr_err("Unsupported PMU on vcpu%d\n", vcpu_idx);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment