RE: [PATCH v4 1/3] vfio/nvgrace-gpu: Read dvsec register to determine need for uncached resmem

From: Tian, Kevin
Date: Mon Jan 20 2025 - 02:09:24 EST


> From: ankita@xxxxxxxxxx <ankita@xxxxxxxxxx>
> Sent: Saturday, January 18, 2025 7:37 AM
>
> @@ -46,6 +51,7 @@ struct nvgrace_gpu_pci_core_device {
> struct mem_region resmem;
> /* Lock to control device memory kernel mapping */
> struct mutex remap_lock;
> + bool has_mig_hw_bug_fix;

Is 'has_mig_hw_bug" clearer given GB+ hardware should all inherit
the fix anyway?

>
> if (ops == &nvgrace_gpu_pci_ops) {
> + nvdev->has_mig_hw_bug_fix =
> nvgrace_gpu_has_mig_hw_bug_fix(pdev);
> +

Move it into nvgrace_gpu_init_nvdev_struct() which has plenty
of information to help understand that line.