aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2019-01-25 18:08:00 +0000
committerWill Deacon <will.deacon@arm.com>2019-01-30 13:42:30 +0000
commit93e9e2d6a8b31c63896aa287d3b3314195017249 (patch)
tree5bc6b0f0024274f1412b4ae4bd0d5da09decd69f
parente1c7c62afc7b998a0965cd9c3617f0513e2c3c27 (diff)
downloadkvmtool-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arm/pmu.c b/arm/pmu.c
index 69c37fae..ffd152e2 100644
--- a/arm/pmu.c
+++ b/arm/pmu.c
@@ -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);
}