Re: [PATCH v4 1/1] vfio/nvgrace-gpu: Add Blackwell-Next GPU readiness check via CXL DVSEC

From: Ilpo Järvinen

Date: Wed Apr 22 2026 - 08:47:25 EST


On Tue, 21 Apr 2026, Ankit Agrawal wrote:

> Thanks for the review Ilpo!
>
> >> + * Decode the 3-bit Memory_Active_Timeout field from CXL DVSEC Range 1 Low
> >> + * (bits 15:13) into milliseconds. Encoding per CXL spec r4.0 sec 8.1.3.8.2:
> >> + * 000b = 1s, 001b = 4s, 010b = 16s, 011b = 64s, 100b = 256s,
> >> + * 101b-111b = reserved (clamped to 256s).
> >> + */
> >> +static inline unsigned long cxl_mem_active_timeout_ms(u8 timeout)
> >> +{
> >> +     return 1000UL << (2 * min_t(u8, timeout, 4));
> >
> > MSEC_PER_SEC
>
> Ack.

I didn't see this change in v5.

> > Also, don't forget to add include for units.h.
>
> Sorry why do we need to do this? The MSEC_PER_SEC is getting included through
> jiffies.h.

Sorry, I mixed from what header it comes from and it doesn't exactly
comes from jiffies.h either. If C files rely on indirect includes
through other header, it makes painful to refactor headers.

--
i.