linux-stable/arch/arm64
Christoffer Dall e6d68b00e9 arm64: Use physical counter for in-kernel reads when booted in EL2
Using the physical counter allows KVM to retain the offset between the
virtual and physical counter as long as it is actively running a VCPU.

As soon as a VCPU is released, another thread is scheduled or we start
running userspace applications, we reset the offset to 0, so that
userspace accessing the virtual timer can still read the virtual counter
and get the same view of time as the kernel.

This opens up potential improvements for KVM performance, but we have to
make a few adjustments to preserve system consistency.

Currently get_cycles() is hardwired to arch_counter_get_cntvct() on
arm64, but as we move to using the physical timer for the in-kernel
time-keeping on systems that boot in EL2, we should use the same counter
for get_cycles() as for other in-kernel timekeeping operations.

Similarly, implementations of arch_timer_set_next_event_phys() is
modified to use the counter specific to the timer being programmed.

VHE kernels or kernels continuing to use the virtual timer are
unaffected.

Cc: Will Deacon <will.deacon@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Christoffer Dall <cdall@linaro.org>
2017-11-06 16:23:09 +01:00
..
boot Amlogic 64-bit DT updates for v4.14 (round 3) 2017-10-04 10:30:39 -07:00
configs ARM/arm64: SoC platform updates for v4.14 2017-09-10 20:35:46 -07:00
crypto crypto: arm64/aes - avoid expanded lookup tables in the final round 2017-08-04 09:27:26 +08:00
include arm64: Use physical counter for in-kernel reads when booted in EL2 2017-11-06 16:23:09 +01:00
kernel arm64: Ensure fpsimd support is ready before userspace is active 2017-10-06 16:35:25 +01:00
kvm First batch of KVM changes for 4.14 2017-09-08 15:18:36 -07:00
lib arm64: uaccess: Add the uaccess_flushcache.c file 2017-08-10 10:49:21 +01:00
mm arm64: fix misleading data abort decoding 2017-10-02 15:05:58 +01:00
net bpf, arm64: implement jiting of BPF_J{LT, LE, SLT, SLE} 2017-08-09 16:53:56 -07:00
xen
Kconfig Merge branch 'arm64/vmap-stack' of git://git.kernel.org/pub/scm/linux/kernel/git/mark/linux into for-next/core 2017-08-15 18:40:58 +01:00
Kconfig.debug arm64: relocation testing module 2017-04-04 17:03:32 +01:00
Kconfig.platforms ARM: arm64: Devicetree updates for v4.14 2017-09-10 20:54:48 -07:00
Makefile arm64: ensure the kernel is compiled for LP64 2017-09-18 11:20:20 +01:00