Nova, the new driver written in Rust from Red Hat for NVIDIA GPUs

Nova

Nova a new Direct Rendering Manager (DRM) kernel driver written in Rust

Since Nvidia released its kernel modules GPU as open source, it seemed that both the Nvidia proprietary driver and the Nouveau open source driver would have great improvements with the contributions that the community could make and even that at some point Nouveau could be up to the task.

After several months and Nouveau development will slow down, Red Hat has taken action on the matter and recently announced the news that is working on the Nova project, which presents as a new open driver for NVIDIA GPUs which is being developed in Rust.

This driver includes GPU initialization and control operations in the firmware, using a standalone GSP microcontroller. Nova is designed as a module for the Linux kernel and uses the DRM (Direct Rendering Manager) subsystem. This project is considered a continuation of the development of the Nouveau driver for GPUs with GSP firmware.

Danilo Krummrich (Red Hat) explains:

With Nova we have the opportunity to significantly reduce complexity compared to Nouveau, for two main reasons. First of all, the historical Nouveau architecture, especially around nvif/nvkm, is quite complicated and inflexible and requires a major overhaul to resolve some issues. Next, we also want to take the opportunity to contribute to Rust's efforts in the kernel and benefit from the increased memory safety offered by the Rust programming language.

In addition, it is mentioned that with the development of Nova, Red Hat intends to take the opportunity to contribute to Rust's efforts in the kernel, since as mentioned the driver code is written in Rust and uses several layers to develop video drivers in this language. For example, the driver uses abstractions from the Rust-Device branch to create drivers, components from the Rust-Pci branch to work with the PCI bus, and bindings for the DRM and GEM subsystems from the Rust-DRM branch.

Also mentioned is the development of the drm-asahi Rust driver for Apple M1 and M2 chip GPUs. The use of Rust is expected to increase the security and reliability of the driver by reducing the probability of errors when working with memory and allowing the combination of work on the video driver with the development of common components in Rust.

The goal from Nova is eventually become an open source driver for NVIDIA Linux, aimed at Turing GPUs and newer models (especially in the RTX 2000 series) that support GSP. This new controller is being developed in Rust to achieve greater lightness and flexibility, which is presented as a promising option.

One the reasons to create a new controller is to simplify the process compared to Nouveau, thanks to the use of ready-to-use drivers provided by the GSP firmware. This avoids unnecessary complexity in the Nouveau driver code, which needs to support older NVIDIA GPUs and introduces issues such as crashes in the VMM/MMU code. By developing Nova from scratch and focusing only on GSP-based GPUs, it is hoped to avoid these problems and complications.

On the other hand, Red Hat also mentions some of the points it needs to address, saying that with the choice of Rust, the first problem to solve is the lack of C binding abstractions for end-to-end kernel infrastructure:

"e.g. device/driver abstractions... we need a user for the upstream abstractions, but we also need the abstractions to create a driver - we want to develop Nova upstream and start with just a stub that only makes use of a few abstractions Rust basics.

finally if you are interested in knowing more about it, you can check the details In the following link, as well as consult the development and consult the source code of this in your repository.


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.