You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solo5 does not implement interrupt support. It just implements what's needed to implement an event loop: a poll call. The rumprun event loop (below netbsd) looks like this:
schedule() {
...
bmk_platform_splx
for (;;) {
curtime = bmk_platform_cpu_clock_monotonic();
FOR thread in ALL_THREADS:
if (thread->bt_wakeup_time <= curtime)
bmk_sched_wake(thread);
bmk_platform_splhigh
bmk_platform_cpu_block
bmk_platform_splx
}
...
}
Those bmk_ functions are platform specific calls implemented for each platform
at platform/hw/, platform/xen/, and now platform/solo5/. In particular, the
functions implemented above are:
bmk_platform_splhigh // enable interrupts
bmk_platform_splx // disable interrupts
bmk_platform_cpu_block // sleep until interrupt (or something happens)
bmk_platform_cpu_clock_monotonic // get monotonic time
It turns out that these functions can be trivially implemented in solo5. There are no interrupts
in solo5, so splhigh and splx are NOOPs. cpu_clock_monotonic and cpu_block map directly
to solo5 like this:
bmk_time_t
bmk_platform_cpu_clock_monotonic(void)
{
return solo5_clock_monotonic();
}
void bmk_platform_cpu_block(bmk_time_t until_ns)
{
if (solo5_poll(until_ns)) // if there is pending work
rumpcomp_ukvmif_receive();
}
Hi @anttikantee @mato @ricarkol ,
Could you guys help elaborate on how does rumprun implement the interrupt support with solo5 platform?
Regards,
Haibo
The text was updated successfully, but these errors were encountered: