Re: [PATCH 6/7] gpu: nova-core: send UNLOADING_GUEST_DRIVER GSP command GSP upon unloading

Timur Tabi
2025-12-18T23:34:33Z

On Thu, 2025-12-18 at 22:44 +0000, Joel Fernandes wrote:
> > Isn't the real problem that we are polling for a specific message, when all message should be
> > handled asynchronously as events, like Nouveau does?
> >
> >           Err(ERANGE) => continue,
> >
> > This effectively throws out all other messages, including errors and anything else important.
> >
>
> Indeed, for that we need Interrupts. For the rest of the patterns where we need the message
> synchronously, we should bound this. Hanging in the driver is unacceptable.

It's going to be difficulty to have a running asynchronous message handler in the background *and*
poll synchronously for a specific message on occasional. I would say that even in this case, we
should handle the message asynchronously. So instead of polling on the message queue, we just wait
on a semaphore, with a timeout.

> Interrupts are almost here now, considering we/others have upstreamed all the required patches for
> Rust interrupt support.

So my suggestion is that we don't overcomplicate this code today, since it's all going to be ripped
out later.