summaryrefslogtreecommitdiff
path: root/net/batman-adv/bat_v_ogm.h
diff options
context:
space:
mode:
authorMarc Zyngier <marc.zyngier@arm.com>2016-12-06 17:34:22 +0300
committerMarc Zyngier <marc.zyngier@arm.com>2016-12-09 18:47:00 +0300
commit21cbe3cc8a48ff17059912e019fbde28ed54745a (patch)
tree6137c0015f8f1ac21d76c80be16215d17106a054 /net/batman-adv/bat_v_ogm.h
parent8e1a0476f8563cadfa32e9b4fff39c4224553b1e (diff)
downloadlinux-21cbe3cc8a48ff17059912e019fbde28ed54745a.tar.xz
arm64: KVM: pmu: Reset PMSELR_EL0.SEL to a sane value before entering the guest
The ARMv8 architecture allows the cycle counter to be configured by setting PMSELR_EL0.SEL==0x1f and then accessing PMXEVTYPER_EL0, hence accessing PMCCFILTR_EL0. But it disallows the use of PMSELR_EL0.SEL==0x1f to access the cycle counter itself through PMXEVCNTR_EL0. Linux itself doesn't violate this rule, but we may end up with PMSELR_EL0.SEL being set to 0x1f when we enter a guest. If that guest accesses PMXEVCNTR_EL0, the access may UNDEF at EL1, despite the guest not having done anything wrong. In order to avoid this unfortunate course of events (haha!), let's sanitize PMSELR_EL0 on guest entry. This ensures that the guest won't explode unexpectedly. Cc: stable@vger.kernel.org #4.6+ Acked-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'net/batman-adv/bat_v_ogm.h')
0 files changed, 0 insertions, 0 deletions