diff options
author | Andre Przywara <andre.przywara@arm.com> | 2019-01-25 18:08:00 +0000 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2019-01-30 13:42:30 +0000 |
commit | 93e9e2d6a8b31c63896aa287d3b3314195017249 (patch) | |
tree | 5bc6b0f0024274f1412b4ae4bd0d5da09decd69f | |
parent | e1c7c62afc7b998a0965cd9c3617f0513e2c3c27 (diff) | |
download | kvmtool-93e9e2d6a8b31c63896aa287d3b3314195017249.tar.gz |
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 <andre.przywara@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
-rw-r--r-- | arm/pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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); } |