diff options
author | Zhichao Huang <zhichao.huang@linaro.org> | 2017-05-11 08:46:12 -0400 |
---|---|---|
committer | Christoffer Dall <cdall@linaro.org> | 2017-05-15 08:29:27 -0400 |
commit | 9b619a8f08da9f61f166edbbe30ad05c359ec19e (patch) | |
tree | c9e70d5fb7d5aae8697b3d1153b3b8a8bfb4339f | |
parent | 661e6b02b5aa82db31897f36e96324b77450fd7a (diff) |
KVM: arm: rename pm_fake handler to trap_raz_wi
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.
Signed-off-by: Zhichao Huang <zhichao.huang@linaro.org>
Reviewed-by: Alex Bennee <alex.bennee@linaro.org>
Acked-by: Christoffer Dall <christoffer.dall@linaro.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
-rw-r--r-- | arch/arm/kvm/coproc.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/arch/arm/kvm/coproc.c b/arch/arm/kvm/coproc.c index 1403ffb1916b..6d1d2e26dfe5 100644 --- a/arch/arm/kvm/coproc.c +++ b/arch/arm/kvm/coproc.c | |||
@@ -279,7 +279,7 @@ static bool access_gic_sre(struct kvm_vcpu *vcpu, | |||
279 | * must always support PMCCNTR (the cycle counter): we just RAZ/WI for | 279 | * must always support PMCCNTR (the cycle counter): we just RAZ/WI for |
280 | * all PM registers, which doesn't crash the guest kernel at least. | 280 | * all PM registers, which doesn't crash the guest kernel at least. |
281 | */ | 281 | */ |
282 | static bool pm_fake(struct kvm_vcpu *vcpu, | 282 | static bool trap_raz_wi(struct kvm_vcpu *vcpu, |
283 | const struct coproc_params *p, | 283 | const struct coproc_params *p, |
284 | const struct coproc_reg *r) | 284 | const struct coproc_reg *r) |
285 | { | 285 | { |
@@ -289,19 +289,19 @@ static bool pm_fake(struct kvm_vcpu *vcpu, | |||
289 | return read_zero(vcpu, p); | 289 | return read_zero(vcpu, p); |
290 | } | 290 | } |
291 | 291 | ||
292 | #define access_pmcr pm_fake | 292 | #define access_pmcr trap_raz_wi |
293 | #define access_pmcntenset pm_fake | 293 | #define access_pmcntenset trap_raz_wi |
294 | #define access_pmcntenclr pm_fake | 294 | #define access_pmcntenclr trap_raz_wi |
295 | #define access_pmovsr pm_fake | 295 | #define access_pmovsr trap_raz_wi |
296 | #define access_pmselr pm_fake | 296 | #define access_pmselr trap_raz_wi |
297 | #define access_pmceid0 pm_fake | 297 | #define access_pmceid0 trap_raz_wi |
298 | #define access_pmceid1 pm_fake | 298 | #define access_pmceid1 trap_raz_wi |
299 | #define access_pmccntr pm_fake | 299 | #define access_pmccntr trap_raz_wi |
300 | #define access_pmxevtyper pm_fake | 300 | #define access_pmxevtyper trap_raz_wi |
301 | #define access_pmxevcntr pm_fake | 301 | #define access_pmxevcntr trap_raz_wi |
302 | #define access_pmuserenr pm_fake | 302 | #define access_pmuserenr trap_raz_wi |
303 | #define access_pmintenset pm_fake | 303 | #define access_pmintenset trap_raz_wi |
304 | #define access_pmintenclr pm_fake | 304 | #define access_pmintenclr trap_raz_wi |
305 | 305 | ||
306 | /* Architected CP15 registers. | 306 | /* Architected CP15 registers. |
307 | * CRn denotes the primary register number, but is copied to the CRm in the | 307 | * CRn denotes the primary register number, but is copied to the CRm in the |
@@ -566,7 +566,7 @@ int kvm_handle_cp14_64(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
566 | struct coproc_params params = decode_64bit_hsr(vcpu); | 566 | struct coproc_params params = decode_64bit_hsr(vcpu); |
567 | 567 | ||
568 | /* raz_wi cp14 */ | 568 | /* raz_wi cp14 */ |
569 | pm_fake(vcpu, ¶ms, NULL); | 569 | trap_raz_wi(vcpu, ¶ms, NULL); |
570 | 570 | ||
571 | /* handled */ | 571 | /* handled */ |
572 | kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu)); | 572 | kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu)); |
@@ -621,7 +621,7 @@ int kvm_handle_cp14_32(struct kvm_vcpu *vcpu, struct kvm_run *run) | |||
621 | struct coproc_params params = decode_32bit_hsr(vcpu); | 621 | struct coproc_params params = decode_32bit_hsr(vcpu); |
622 | 622 | ||
623 | /* raz_wi cp14 */ | 623 | /* raz_wi cp14 */ |
624 | pm_fake(vcpu, ¶ms, NULL); | 624 | trap_raz_wi(vcpu, ¶ms, NULL); |
625 | 625 | ||
626 | /* handled */ | 626 | /* handled */ |
627 | kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu)); | 627 | kvm_skip_instr(vcpu, kvm_vcpu_trap_il_is32bit(vcpu)); |