Re: [PATCH v8 7/9] perf/amd/iommu: Check return value when set and get counter value

2017-01-23 Thread Peter Zijlstra
On Mon, Jan 16, 2017 at 01:23:34AM -0600, Suravee Suthikulpanit wrote: > From: Suravee Suthikulpanit > > In, perf_iommu_start(), we need to check the return value from > amd_iommu_set_reg(). In case of failure, we should not enable the PMU. > > Also, in

Re: [PATCH v8 7/9] perf/amd/iommu: Check return value when set and get counter value

2017-01-22 Thread Borislav Petkov
On Mon, Jan 16, 2017 at 01:23:34AM -0600, Suravee Suthikulpanit wrote: > From: Suravee Suthikulpanit > > In, perf_iommu_start(), we need to check the return value from > amd_iommu_set_reg(). In case of failure, we should not enable the PMU. > > Also, in

[PATCH v8 7/9] perf/amd/iommu: Check return value when set and get counter value

2017-01-15 Thread Suravee Suthikulpanit
From: Suravee Suthikulpanit In, perf_iommu_start(), we need to check the return value from amd_iommu_set_reg(). In case of failure, we should not enable the PMU. Also, in perf_iommu_read(), we need to check the return value from amd_iommu_get_reg() before using