On 10/30/25 3:22 PM, Timur Tabi wrote:
> On Wed, 2025-10-29 at 22:30 -0700, John Hubbard wrote:
>> 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.
> 
> Sure, and this is exactly what is_ancient_gpu() does.  It tells you whether 
> to use boot42
> instead of boot0.  It is the only function that looks at boot0.

I think you're indeed talking about the same thing, but thinking differently
about the implementation details.

A standalone is_ancient_gpu() function called from probe() like

        if is_ancient_gpu(bar) {
                return Err(ENODEV);
        }

is what we would probably do in C, but in Rust we should just call

        let spec = Spec::new()?;

from probe() and Spec::new() will return Err(ENODEV) when it run into an ancient
GPU spec internally.

Reply via email to