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

Alexandre Courbot
2026-01-14T14:02:58Z

On Sun Dec 21, 2025 at 6:30 AM JST, Timur Tabi wrote:
> On Fri, 2025-12-19 at 12:39 +0900, Alexandre Courbot wrote:
>
>
>
>> Does Nouveau really handle all messages asynchronously? Just taking a
>> look at `r535_gsp_rpc_send` I see:
>>
>> * A potential busy-loop with `r535_gsp_rpc_handle_reply`, An argument to
>> * define whether we should wait for a reply (`policy`).
>>
>> So it seems like each GSP command expecting a reply is effectively
>> looping until it arrives, with some messages (LIBOS_PRINT, SEQUENCER,
>> etc.) being managed by a notifier registered with the command queue. But
>> messages sent explicitly by the driver don't seem to make use of it and
>> instead process messages until they find their reply.
>
> Yes, you're right. But the difference is that in Nouveau, all message processing is handled by
> r535_gsp_msg_recv(), which always also handles all of the asynchronous "other" messages.
>
> The above `loop` expression in Nova doesn't do that. It's missing the asynchronous handler.
> This is the crux of my concern.

I agree with you that this is something we want to improve (either by
adding a handler to the loop, or some other way). It should be its own
patch series once we have better visibility about how we want to handle
message, as the current implementation is still very crude and ad-hoc.