KVM: arm/arm64: consolidate arch timer trap handlers
At the moment we have separate system register emulation handlers for each timer register. Actually they are quite similar, and we rely on kvm_arm_timer_[gs]et_reg() for the actual emulation anyways, so let's just merge all of those handlers into one function, which just marshalls the arguments and then hands off to a set of common accessors. This makes extending the emulation to include EL2 timers much easier. Signed-off-by:Andre Przywara <andre.przywara@arm.com> [Fixed 32-bit VM breakage and reduced to reworking existing code] Signed-off-by:
Christoffer Dall <christoffer.dall@arm.com> [Fixed 32bit host, general cleanup] Signed-off-by:
Marc Zyngier <marc.zyngier@arm.com>
Showing
- arch/arm/kvm/coproc.c 14 additions, 9 deletionsarch/arm/kvm/coproc.c
- arch/arm64/include/asm/sysreg.h 4 additions, 0 deletionsarch/arm64/include/asm/sysreg.h
- arch/arm64/kvm/sys_regs.c 33 additions, 40 deletionsarch/arm64/kvm/sys_regs.c
- include/kvm/arm_arch_timer.h 23 additions, 0 deletionsinclude/kvm/arm_arch_timer.h
- virt/kvm/arm/arch_timer.c 113 additions, 17 deletionsvirt/kvm/arm/arch_timer.c
Loading
Please register or sign in to comment