[PATCH 1/9] arm64: KVM: rename pm_fake handler to trap_wi_raz
Peter Maydell
peter.maydell at linaro.org
Wed May 7 08:34:19 PDT 2014
On 7 May 2014 16:20, Marc Zyngier <marc.zyngier at arm.com> wrote:
> pm_fake doesn't quite describe what the handler does (ignoring writes
> and returning 0 for reads).
>
> As we're about to use it (a lot) in a different context, rename it
> with a (admitedly cryptic) name that make sense for all users.
> -/*
> - * We could trap ID_DFR0 and tell the guest we don't support performance
> - * monitoring. Unfortunately the patch to make the kernel check ID_DFR0 was
> - * NAKed, so it will read the PMCR anyway.
> - *
> - * Therefore we tell the guest we have 0 counters. Unfortunately, we
> - * must always support PMCCNTR (the cycle counter): we just RAZ/WI for
> - * all PM registers, which doesn't crash the guest kernel at least.
> - */
> -static bool pm_fake(struct kvm_vcpu *vcpu,
> - const struct sys_reg_params *p,
> - const struct sys_reg_desc *r)
> +static bool trap_wi_raz(struct kvm_vcpu *vcpu,
> + const struct sys_reg_params *p,
> + const struct sys_reg_desc *r)
The standard term for this is "RAZ/WI", not "WI/RAZ", so
why not "trap_raz_wi" ?
thanks
-- PMM
More information about the linux-arm-kernel
mailing list