linux/arch/arm64
Jintack 1650ac49c2 arm64: head.S: Fix CNTHCTL_EL2 access on VHE system
Bit positions of CNTHCTL_EL2 are changing depending on HCR_EL2.E2H bit.
EL1PCEN and EL1PCTEN are 1st and 0th bits when E2H is not set, but they
are 11th and 10th bits respectively when E2H is set.  Current code is
unintentionally setting wrong bits to CNTHCTL_EL2 with E2H set.

In fact, we don't need to set those two bits, which allow EL1 and EL0 to
access physical timer and counter respectively, if E2H and TGE are set
for the host kernel. They will be configured later as necessary. First,
we don't need to configure those bits for EL1, since the host kernel
runs in EL2.  It is a hypervisor's responsibility to configure them
before entering a VM, which runs in EL0 and EL1. Second, EL0 accesses
are configured in the later stage of boot process.

Signed-off-by: Jintack Lim <jintack@cs.columbia.edu>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
2016-11-29 11:37:05 +00:00
..
boot Correct regulator handling on Rockchip arm64 boards to make 2016-10-29 11:09:37 -07:00
configs arm64: Enable HIBERNATION in defconfig 2016-11-23 18:04:44 +00:00
crypto crypto: arm64/aes-ctr - fix NULL dereference in tail processing 2016-09-13 18:44:59 +08:00
include arm64: Remove I-cache invalidation from flush_cache_range() 2016-11-23 18:05:52 +00:00
kernel arm64: head.S: Fix CNTHCTL_EL2 access on VHE system 2016-11-29 11:37:05 +00:00
kvm arm64: Support systems without FP/ASIMD 2016-11-16 18:05:10 +00:00
lib arm64: Factor out PAN enabling/disabling into separate uaccess_* macros 2016-11-21 17:33:47 +00:00
mm arm64: Remove I-cache invalidation from flush_cache_range() 2016-11-23 18:05:52 +00:00
net arm64: bpf: optimize LD_ABS, LD_IND 2016-06-10 23:11:50 -07:00
xen arm64: xen: Enable user access before a privcmd hvc call 2016-11-21 18:48:55 +00:00
Kconfig arm64: Enable CONFIG_ARM64_SW_TTBR0_PAN 2016-11-21 18:48:55 +00:00
Kconfig.debug arm64: dump: Add checking for writable and exectuable pages 2016-11-07 18:15:04 +00:00
Kconfig.platforms arm64: uniphier: select ARCH_HAS_RESET_CONTROLLER 2016-10-22 18:25:52 +09:00
Makefile arm64: kernel: force ET_DYN ELF type for CONFIG_RELOCATABLE=y 2016-10-20 11:37:25 +01:00