linux_dsm_epyc7002/arch/arm64/kvm/hyp
Shannon Zhao d692b8ad6e arm64: KVM: Add access handler for PMUSERENR register
This register resets as unknown in 64bit mode while it resets as zero
in 32bit mode. Here we choose to reset it as zero for consistency.

PMUSERENR_EL0 holds some bits which decide whether PMU registers can be
accessed from EL0. Add some check helpers to handle the access from EL0.

When these bits are zero, only reading PMUSERENR will trap to EL2 and
writing PMUSERENR or reading/writing other PMU registers will trap to
EL1 other than EL2 when HCR.TGE==0. To current KVM configuration
(HCR.TGE==0) there is no way to get these traps. Here we write 0xf to
physical PMUSERENR register on VM entry, so that it will trap PMU access
from EL0 to EL2. Within the register access handler we check the real
value of guest PMUSERENR register to decide whether this access is
allowed. If not allowed, return false to inject UND to guest.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
2016-02-29 18:34:21 +00:00
..
debug-sr.c arm64: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h 2016-02-29 18:34:18 +00:00
entry.S arm64: KVM: VHE: Add fpsimd enabling on guest access 2016-02-29 18:34:17 +00:00
fpsimd.S arm64: KVM: Implement fpsimd save/restore 2015-12-14 11:30:41 +00:00
hyp-entry.S arm64: KVM: Move most of the fault decoding to C 2016-02-29 18:34:18 +00:00
Makefile arm64: KVM: Move vgic-v2 and timer save/restore to virt/kvm/arm/hyp 2016-02-29 18:34:18 +00:00
s2-setup.c arm64: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h 2016-02-29 18:34:18 +00:00
switch.c arm64: KVM: Add access handler for PMUSERENR register 2016-02-29 18:34:21 +00:00
sysreg-sr.c arm64: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h 2016-02-29 18:34:18 +00:00
tlb.c arm64: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h 2016-02-29 18:34:18 +00:00
vgic-v3-sr.c arm64: KVM: Move kvm/hyp/hyp.h to include/asm/kvm_hyp.h 2016-02-29 18:34:18 +00:00