|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] xen/arm: remove physical timer offset
Hi, On 05/12/2019 19:17, Jeff Kubascik wrote: On 12/3/2019 1:04 PM, Julien Grall wrote:Hi, On 26/11/2019 21:13, Jeff Kubascik wrote: It would be great if you can split it. Thank you! [...]
boot_count refers to when Xen began to boot, not the start of the physical counter. If you look at the condition to fire the timer (see below), then it means the timer will fire right now because the physical counter is past CompareValue (cval). TimerConditionMet = (((Counter[63:0] – Offset[63:0])[63:0] - CompareValue[63:0]) >= 0) We only subtract boot_count here as the timer subsystem expects a relative number of nanoseconds from when Xen booted. However, set_timer expects a signed 64 bit value in ns. The conversion of cval (unsigned 64 bit) from ticks to ns is going to overflow this. I'm not sure what would be the best way to work around this limitation. At the very least, I think we should print a warning message. A warning message in emulation is definitely not the right solution. If a user asks something that is valid from the spec PoV then we should implement it correctly. The more that I don't think boot_count store what you expect (see above). But we definitely can't allow the caller of ticks_to_ns() to pass a negative value as argument because (cval - boot_count) may be over 2^63 for instance if the user requests a timer to be set in a million of year (I didn't do the math!). Cheers, -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |