Re: [PATCH v5 21/20] arm/arm64: KVM: Load the timer state when enabling the timer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Oct 29 2017 at  2:48:56 am GMT, Christoffer Dall <christoffer.dall@xxxxxxxxxx> wrote:
> After being lazy with saving/restoring the timer state, we defer that
> work to vcpu_load and vcpu_put, which ensure that the timer state is
> loaded on the hardware timers whenever the VCPU runs.
>
> Unfortunately, we are failing to do that the first time vcpu_load()
> runs, because the timer has not yet been enabled at that time.  As long
> as the initialized timer state matches what happens to be in the
> hardware (a disabled timer, because we never leave the timer screaming),
> this does not show up as a problem, but is nevertheless incorrect.
>
> The solution is simple; disable preemption while setting the timer to be
> enabled, and call the timer load function when first enabling the timer.
>
> Signed-off-by: Christoffer Dall <christoffer.dall@xxxxxxxxxx>

Acked-by: Marc Zyngier <marc.zyngier@xxxxxxx>

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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux