]> asedeno.scripts.mit.edu Git - linux.git/commit
KVM: arm/arm64: consolidate arch timer trap handlers
authorAndre Przywara <andre.przywara@arm.com>
Thu, 5 Jul 2018 15:48:23 +0000 (16:48 +0100)
committerMarc Zyngier <marc.zyngier@arm.com>
Tue, 19 Feb 2019 21:05:40 +0000 (21:05 +0000)
commit84135d3d18da2ff17d3ad1a609b2818cc3049552
treec72a908ddb0d63d73e186273e3b12c0f180ea9c2
parent09838de943d4c0ee75a99cd7665940705ab8dcea
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>
arch/arm/kvm/coproc.c
arch/arm64/include/asm/sysreg.h
arch/arm64/kvm/sys_regs.c
include/kvm/arm_arch_timer.h
virt/kvm/arm/arch_timer.c