Peter Maydell <peter.mayd...@linaro.org> writes: > When we are calculating timer deadlines, the correct definition of > whether or not to apply an offset to the physical count is described > in the Arm ARM DDI4087 rev L.a section D12.2.4.1. This is different > from when the offset should be applied for a direct read of the > counter sysreg. > > We got this right for the EL1 physical timer and for the EL1 virtual > timer, but got all the rest wrong: they should be using a zero offset > always. > > Factor the offset calculation out into a function that has a comment > documenting exactly which offset it is calculating and which gets the > HYP, SEC, and HYPVIRT cases right. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
Reviewed-by: Alex Bennée <alex.ben...@linaro.org> -- Alex Bennée Virtualisation Tech Lead @ Linaro