Skip to content

Commit

Permalink
KVM: arm64: nv: arch_timer: Support hyp timer emulation
Browse files Browse the repository at this point in the history
Emulating EL2 also means emulating the EL2 timers. To do so, we expand
our timer framework to deal with at most 4 timers. At any given time,
two timers are using the HW timers, and the two others are purely
emulated.

The role of deciding which is which at any given time is left to a
mapping function which is called every time we need to make such a
decision.

Signed-off-by: Christoffer Dall <christoffer.dall@arm.com>
[maz: added CNTVOFF support, general reworking for v4.8]
Signed-off-by: Marc Zyngier <maz@kernel.org>
  • Loading branch information
christofferdall-arm authored and intel-lab-lkp committed Dec 10, 2020
1 parent 1072040 commit af7a3ca
Show file tree
Hide file tree
Showing 7 changed files with 186 additions and 5 deletions.
4 changes: 4 additions & 0 deletions arch/arm64/include/asm/kvm_host.h
Expand Up @@ -272,6 +272,10 @@ enum vcpu_sysreg {
TPIDR_EL2, /* EL2 Software Thread ID Register */
CNTHCTL_EL2, /* Counter-timer Hypervisor Control register */
SP_EL2, /* EL2 Stack Pointer */
CNTHP_CTL_EL2,
CNTHP_CVAL_EL2,
CNTHV_CTL_EL2,
CNTHV_CVAL_EL2,

NR_SYS_REGS /* Nothing after this line! */
};
Expand Down

0 comments on commit af7a3ca

Please sign in to comment.