Timur Tabi
2025-Oct-30 01:44 UTC
[PATCH v3 2/2] gpu: nova-core: add boot42 support for next-gen GPUs
On Wed, 2025-10-29 at 18:07 -0700, John Hubbard wrote:> Yes, but someone can still plug in a pre-Turing GPU and try to > boot up with nova-core.ko on the system. > > So it's important to avoid getting into trouble in that case.Sure, but I think we don't want any real code that looks at boot0. Nova should really just look at boot42 to determine any architecture. So what we really want is to avoid accidentally reading boot42 on GPUs where it doesn't exist. I believe that the oldest GPU that supports boot42 is Fermi GF100, or chipset id 0x0c0. So we can do something like this: fn is_gpu_ancient(bar: &Bar0) -> bool { let boot0 = regs::NV_PMC_BOOT_0::read(bar); if boot0.architecture_1() == 0 && boot0.architecture_0() < 0x0c0 { return true; } else { return false; } At the beginning of probe(), if is_gpu_ancient() returns true, just exit immediately. Then the rest of the driver can happily ignore boot0 completely and use boot42 for everything. Just my two cents.
John Hubbard
2025-Oct-30 05:30 UTC
[PATCH v3 2/2] gpu: nova-core: add boot42 support for next-gen GPUs
On 10/29/25 6:44 PM, Timur Tabi wrote:> On Wed, 2025-10-29 at 18:07 -0700, John Hubbard wrote: >> Yes, but someone can still plug in a pre-Turing GPU and try to >> boot up with nova-core.ko on the system. >> >> So it's important to avoid getting into trouble in that case. > > Sure, but I think we don't want any real code that looks at boot0. Nova should really just look > at boot42 to determine any architecture. So what we really want is to avoid accidentallyOh I really understand your sentiment here. I'm all about, "use the new hardware and never look back". :) However, I don't want anyone to have to risk reading boot42 on some ancient GPU (earlier than Fermi, even), with uncertain results. And our HW team has promised to leave behind arch0==0, arch1==1 in in boot0, more or less forever, specifically to help us out here. With that in mind, I *do* want to read boot0 for the forseeable future, as a guide to whether to look at boot42. I really think that is the way to thread the needle here. thanks, -- John Hubbard