]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Refactor PMU attribute error handling
authorMarc Zyngier <maz@kernel.org>
Thu, 12 Mar 2020 17:27:36 +0000 (17:27 +0000)
committerMarc Zyngier <maz@kernel.org>
Tue, 29 Sep 2020 13:19:38 +0000 (14:19 +0100)
commitde21043f13ace2f164ef186c3a1c9ed19d184c41
tree87b6dcf13dd8fa6d939dd882443b436efb589dcb
parent85bf7539dcf2f9c7c3cfc0844cdf8c43b3574234
KVM: arm64: Refactor PMU attribute error handling

The PMU emulation error handling is pretty messy when dealing with
attributes. Let's refactor it so that we have less duplication,
and that it is easy to extend later on.

A functional change is that kvm_arm_pmu_v3_init() used to return
-ENXIO when the PMU feature wasn't set. The error is now reported
as -ENODEV, matching the documentation. -ENXIO is still returned
when the interrupt isn't properly configured.

Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/kvm/pmu-emul.c