]> git.ipfire.org Git - thirdparty/linux.git/commit
gpu: nova-core: send UNLOADING_GUEST_DRIVER GSP command upon unloading
authorAlexandre Courbot <acourbot@nvidia.com>
Fri, 29 May 2026 07:33:42 +0000 (16:33 +0900)
committerAlexandre Courbot <acourbot@nvidia.com>
Sat, 30 May 2026 04:33:24 +0000 (13:33 +0900)
commit96c377e999737cddbfbf1de975b5285fa047c4bc
tree453e9296f4d66065760d2b4a6e1e7ecca5525684
parenta355d2dd381d129135d1199d66a7f96490551bac
gpu: nova-core: send UNLOADING_GUEST_DRIVER GSP command upon unloading

Currently, the GSP is left running after the driver is unbound. This is
not great for several reasons, notably that it can still access shared
memory areas that the kernel will now reclaim (especially problematic on
setups without an IOMMU).

Fix this by sending the `UNLOADING_GUEST_DRIVER` GSP command when the
`Gpu` is dropped. This stops the GSP and lets us proceed with the rest
of the unbind sequence in a later patch.

Reviewed-by: Eliot Courtney <ecourtney@nvidia.com>
Co-developed-by: Eliot Courtney <ecourtney@nvidia.com>
Signed-off-by: Eliot Courtney <ecourtney@nvidia.com>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Link: https://patch.msgid.link/20260529-nova-unload-v7-2-678f39209e00@nvidia.com
[acourbot: `Result<()>` -> `Result`]
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
drivers/gpu/nova-core/gpu.rs
drivers/gpu/nova-core/gsp/boot.rs
drivers/gpu/nova-core/gsp/commands.rs
drivers/gpu/nova-core/gsp/fw.rs
drivers/gpu/nova-core/gsp/fw/commands.rs
drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs