[PATCH v4 10/20] KVM: arm/arm64: Use separate timer for phys timer emulation

Marc Zyngier marc.zyngier at arm.com
Wed Oct 25 06:59:13 PDT 2017


On Fri, Oct 20 2017 at  1:49:29 pm BST, Christoffer Dall <christoffer.dall at linaro.org> wrote:
> From: Christoffer Dall <cdall at linaro.org>
>
> We were using the same hrtimer for emulating the physical timer and for
> making sure a blocking VCPU thread would be eventually woken up.  That
> worked fine in the previous arch timer design, but as we are about to
> actually use the soft timer expire function for the physical timer
> emulation, change the logic to use a dedicated hrtimer.
>
> This has the added benefit of not having to cancel any work in the sync
> path, which in turn allows us to run the flush and sync with IRQs
> disabled.
>
> Note that the hrtimer used to program the host kernel's timer to
> generate an exit from the guest when the emulated physical timer fires
> never has to inject any work, and to share the soft_timer_cancel()
> function with the bg_timer, we change the function to only cancel any
> pending work if the pointer to the work struct is not null.
>
> Signed-off-by: Christoffer Dall <cdall at linaro.org>

Acked-by: Marc Zyngier <marc.zyngier at arm.com>

	M.
-- 
Jazz is not dead. It just smells funny.



More information about the linux-arm-kernel mailing list