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

Tian, Kevin
2026-04-10T04:40:14Z

> From: Ankit Agrawal <ankita@nvidia.com>
> Sent: Thursday, April 9, 2026 9:37 PM
>
> +static inline unsigned long nvgrace_gpu_cxl_mem_active_timeout_ms(u8
> timeout)
> +{
> + return 1000UL << (2 * min_t(u8, timeout, 4));
> +}

this is local to this file and simple. it's ok to remove the 'nvgrace_gpu_'
prefix so the caller line is shorter. Later it may be moved to cxl header
file if other callers exist.

> +
> +static int nvgrace_gpu_wait_device_ready_bw_next(struct
> nvgrace_gpu_pci_core_device *nvdev)

it's a new method in Blackwell-Next, but the mechanism is CXL standard.

call it nvgrace_gpu_wait_device_ready_cxl()?

> +{
> + struct pci_dev *pdev = nvdev->core_device.pdev;
> + int pcie_dvsec = nvdev->cxl_dvsec;

s/pcie_dvsec/cxl_dvsec/

> -static int nvgrace_gpu_probe_check_device_ready(struct pci_dev *pdev)
> +static int nvgrace_gpu_probe_check_device_ready(struct
> nvgrace_gpu_pci_core_device *nvdev)
> {
> + struct pci_dev *pdev = nvdev->core_device.pdev;
> void __iomem *io;
> int ret;
>
> @@ -1165,7 +1221,7 @@ static int
> nvgrace_gpu_probe_check_device_ready(struct pci_dev *pdev)
> goto iomap_exit;
> }
>
> - ret = nvgrace_gpu_wait_device_ready(io);
> + ret = nvgrace_gpu_wait_device_ready(nvdev, io);
>
> pci_iounmap(pdev, io);

bar0 mapping is not required in the new method.