• C
    KVM: arm/arm64: Avoid phys timer emulation in vcpu entry/exit · bbdd52cf
    Christoffer Dall 提交于
    There is no need to schedule and cancel a hrtimer when entering and
    exiting the guest, because we know when the physical timer is going to
    fire when the guest programs it, and we can simply program the hrtimer
    at that point.
    
    Now when the register modifications from the guest go through the
    kvm_arm_timer_set/get_reg functions, which always call
    kvm_timer_update_state(), we can simply consider the timer state in this
    function and schedule and cancel the timers as needed.
    
    This avoids looking at the physical timer emulation state when entering
    and exiting the VCPU, allowing for faster servicing of the VM when
    needed.
    Signed-off-by: NChristoffer Dall <cdall@linaro.org>
    Reviewed-by: NMarc Zyngier <marc.zyngier@arm.com>
    bbdd52cf
arch_timer.c 25.2 KB