• Marc Zyngier's avatar
    KVM: arm64: Refactor PMU attribute error handling · 42223fb1
    Marc Zyngier authored
    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: default avatarMarc Zyngier <maz@kernel.org>
    42223fb1
pmu-emul.c 21.8 KB