On 13.01.2026 17:33, Oleksii Kurochko wrote: > On 1/12/26 4:12 PM, Jan Beulich wrote: >> On 24.12.2025 18:03, Oleksii Kurochko wrote: >>> Introduce pointer to function which points to a specific sbi_set_timer() >>> implementation. It is done in this way as different OpenSBI version can >>> have different Extenion ID and/or funcion ID for TIME extension. >>> >>> sbi_set_time() programs the clock for next event after stime_value >>> time. This function also clears the pending timer interrupt bit. >>> >>> Introduce extension ID and SBI function ID for TIME extension. >>> >>> Implement only sbi_set_timer_v02() as there is not to much sense >>> to support earlier version and, at the moment, Xen supports only v02. >> Besides this somewhat contradicting the use of a function pointer: What >> about the legacy extension's equivalent? > > I think this is not really needed, and the same implementation can be used for > both the Legacy and TIME extensions, since the API is identical and the only > difference is that|sbi_set_timer()| was moved into a separate extension. > > Since Xen reports to the guest that it supports SBI v0.2, it is up to the > guest > implementation to decide why it is still using|sbi_set_timer()| from the > Legacy extension instead of the TIME extension. > > I think that I can add Legacy extension equivalent but considering that we are > using OpenSBI v0.2 for which Time extension is available it seems for me it is > enough to define sbi_set_timer to sbi_set_timer_v02() for now.
Feels like here you're negating what just before you wrote in reply to 10/15. IOW - I'm now sufficiently confused. (Just consider if you ran Xen itself as a guest of the very same Xen. From what you said for 10/15, it would end up not seeing the TIME extension as available, hence would need a fallback to the Legacy one.) Jan
