From mboxrd@z Thu Jan 1 00:00:00 1970 From: marc.zyngier@arm.com (Marc Zyngier) Date: Wed, 25 Oct 2017 14:59:13 +0100 Subject: [PATCH v4 10/20] KVM: arm/arm64: Use separate timer for phys timer emulation In-Reply-To: <20171020114939.12554-11-christoffer.dall@linaro.org> (Christoffer Dall's message of "Fri, 20 Oct 2017 13:49:29 +0200") References: <20171020114939.12554-1-christoffer.dall@linaro.org> <20171020114939.12554-11-christoffer.dall@linaro.org> Message-ID: <867evjcor2.fsf@arm.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Fri, Oct 20 2017 at 1:49:29 pm BST, Christoffer Dall wrote: > From: Christoffer Dall > > 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 Acked-by: Marc Zyngier M. -- Jazz is not dead. It just smells funny.