Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-04 Thread Joel Fernandes
On Tue, Feb 4, 2025 at 1:46 PM Danilo Krummrich wrote: > > On Mon, Feb 03, 2025 at 03:24:10PM -0500, Joel Fernandes wrote: > > Hi Danilo, > > > > On Fri, Jan 31, 2025 at 11:04:24PM +0100, Danilo Krummrich wrote: > > > +#[pin_data] > > > +pub(crate) struct NovaCore { > > > +#[pin] > > > +pu

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-04 Thread Danilo Krummrich
On Tue, Feb 04, 2025 at 06:42:46PM +, Timur Tabi wrote: > On Fri, 2025-01-31 at 23:04 +0100, Danilo Krummrich wrote: > > +/// Structure encapsulating the firmware blobs required for the GPU to > > operate. > > +#[allow(dead_code)] > > +pub(crate) struct Firmware { > > +booter_load: firmwar

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-04 Thread Danilo Krummrich
On Mon, Feb 03, 2025 at 03:24:10PM -0500, Joel Fernandes wrote: > Hi Danilo, > > On Fri, Jan 31, 2025 at 11:04:24PM +0100, Danilo Krummrich wrote: > > +#[pin_data] > > +pub(crate) struct NovaCore { > > +#[pin] > > +pub(crate) gpu: Gpu, > > +} > > I am curious what is the need for pinning

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-04 Thread Timur Tabi
On Fri, 2025-01-31 at 23:04 +0100, Danilo Krummrich wrote: > +/// Structure encapsulating the firmware blobs required for the GPU to > operate. > +#[allow(dead_code)] > +pub(crate) struct Firmware { > +booter_load: firmware::Firmware, > +booter_unload: firmware::Firmware, > +gsp: firmw

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-03 Thread Joel Fernandes
On Mon, Feb 3, 2025 at 4:00 PM John Hubbard wrote: [..] > > >> +() > >> +)] > >> +); > >> + > >> +impl pci::Driver for NovaCore { > >> +type IdInfo = (); > >> +const ID_TABLE: pci::IdTable = &PCI_TABLE; > >> + > >> +fn probe(pdev: &mut pci::Device, _info: &Self::IdInfo) ->

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-03 Thread John Hubbard
On 2/3/25 12:24 PM, Joel Fernandes wrote: Hi Danilo, On Fri, Jan 31, 2025 at 11:04:24PM +0100, Danilo Krummrich wrote: ... +const BAR0_SIZE: usize = 8; +pub(crate) type Bar0 = pci::Bar; + +kernel::pci_device_table!( +PCI_TABLE, +MODULE_PCI_TABLE, +::IdInfo, +[( +pci::Dev

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-03 Thread Joel Fernandes
Hi Danilo, On Fri, Jan 31, 2025 at 11:04:24PM +0100, Danilo Krummrich wrote: > Add the initial nova-core driver stub. > > nova-core is intended to serve as a common base for nova-drm (the > corresponding DRM driver) and the vGPU manager VFIO driver, serving as a > hard- and firmware abstraction l

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-01 Thread John Hubbard
On 2/1/25 5:52 AM, Danilo Krummrich wrote: On Fri, Jan 31, 2025 at 08:01:00PM -0800, John Hubbard wrote: On 1/31/25 2:04 PM, Danilo Krummrich wrote: ... +/// Enum representation of the GPU generation. +#[derive(Debug)] +pub(crate) enum CardType { +/// Turing +TU100 = 0x160, +/// Am

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-01 Thread Greg KH
On Sat, Feb 01, 2025 at 01:12:35PM +0100, Danilo Krummrich wrote: > On Sat, Feb 01, 2025 at 09:33:28AM +0100, Greg KH wrote: > > On Fri, Jan 31, 2025 at 11:04:24PM +0100, Danilo Krummrich wrote: > > > +impl Gpu { > > > +pub(crate) fn new(pdev: &pci::Device, bar: Devres) -> > > > Result> { > >

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-01 Thread Danilo Krummrich
On Fri, Jan 31, 2025 at 08:01:00PM -0800, John Hubbard wrote: > On 1/31/25 2:04 PM, Danilo Krummrich wrote: > > Add the initial nova-core driver stub. > > > > nova-core is intended to serve as a common base for nova-drm (the > > corresponding DRM driver) and the vGPU manager VFIO driver, serving a

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-01 Thread Danilo Krummrich
On Sat, Feb 01, 2025 at 09:33:28AM +0100, Greg KH wrote: > On Fri, Jan 31, 2025 at 11:04:24PM +0100, Danilo Krummrich wrote: > > +impl Gpu { > > +pub(crate) fn new(pdev: &pci::Device, bar: Devres) -> > > Result> { > > +let spec = GpuSpec::new(&bar)?; > > +let fw = Firmware::new

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-01 Thread Danilo Krummrich
On Sat, Feb 01, 2025 at 09:14:48AM +0100, Karol Herbst wrote: > On Fri, Jan 31, 2025 at 11:04 PM Danilo Krummrich wrote: > > +impl pci::Driver for NovaCore { > > +type IdInfo = (); > > +const ID_TABLE: pci::IdTable = &PCI_TABLE; > > + > > +fn probe(pdev: &mut pci::Device, _info: &Self:

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-01 Thread Greg KH
On Fri, Jan 31, 2025 at 11:04:24PM +0100, Danilo Krummrich wrote: > +impl Gpu { > +pub(crate) fn new(pdev: &pci::Device, bar: Devres) -> Result PinInit> { > +let spec = GpuSpec::new(&bar)?; > +let fw = Firmware::new(pdev.as_ref(), &spec, "535.113.01")?; > + > +dev_info!(

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-01 Thread Karol Herbst
On Fri, Jan 31, 2025 at 11:04 PM Danilo Krummrich wrote: > > Add the initial nova-core driver stub. > > nova-core is intended to serve as a common base for nova-drm (the > corresponding DRM driver) and the vGPU manager VFIO driver, serving as a > hard- and firmware abstraction layer for GSP-based

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-02-01 Thread Karol Herbst
On Sat, Feb 1, 2025 at 9:14 AM Karol Herbst wrote: > > On Fri, Jan 31, 2025 at 11:04 PM Danilo Krummrich wrote: > > > > Add the initial nova-core driver stub. > > > > nova-core is intended to serve as a common base for nova-drm (the > > corresponding DRM driver) and the vGPU manager VFIO driver,

Re: [PATCH 1/2] gpu: nova-core: add initial driver stub

2025-01-31 Thread John Hubbard
On 1/31/25 2:04 PM, Danilo Krummrich wrote: Add the initial nova-core driver stub. nova-core is intended to serve as a common base for nova-drm (the corresponding DRM driver) and the vGPU manager VFIO driver, serving as a hard- and firmware abstraction layer for GSP-based NVIDIA GPUs. The Nova

[PATCH 1/2] gpu: nova-core: add initial driver stub

2025-01-31 Thread Danilo Krummrich
Add the initial nova-core driver stub. nova-core is intended to serve as a common base for nova-drm (the corresponding DRM driver) and the vGPU manager VFIO driver, serving as a hard- and firmware abstraction layer for GSP-based NVIDIA GPUs. The Nova project, including nova-core and nova-drm, in