[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SA1PR12MB7199FB886E677BFF7B78143AB0D0A@SA1PR12MB7199.namprd12.prod.outlook.com>
Date: Mon, 24 Nov 2025 15:39:43 +0000
From: Ankit Agrawal <ankita@...dia.com>
To: Alex Williamson <alex@...zbot.org>
CC: "jgg@...pe.ca" <jgg@...pe.ca>, Yishai Hadas <yishaih@...dia.com>, Shameer
Kolothum <skolothumtho@...dia.com>, "kevin.tian@...el.com"
<kevin.tian@...el.com>, Aniket Agashe <aniketa@...dia.com>, Vikram Sethi
<vsethi@...dia.com>, Matt Ochs <mochs@...dia.com>, "Yunxiang.Li@....com"
<Yunxiang.Li@....com>, "yi.l.liu@...el.com" <yi.l.liu@...el.com>,
"zhangdongdong@...incomputing.com" <zhangdongdong@...incomputing.com>, Avihai
Horon <avihaih@...dia.com>, "bhelgaas@...gle.com" <bhelgaas@...gle.com>,
"peterx@...hat.com" <peterx@...hat.com>, "pstanner@...hat.com"
<pstanner@...hat.com>, Alistair Popple <apopple@...dia.com>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, Neo Jia <cjia@...dia.com>, Kirti Wankhede
<kwankhede@...dia.com>, "Tarun Gupta (SW-GPU)" <targupta@...dia.com>, Zhi
Wang <zhiw@...dia.com>, Dan Williams <danw@...dia.com>, Dheeraj Nigam
<dnigam@...dia.com>, Krishnakant Jaju <kjaju@...dia.com>
Subject: Re: [PATCH v5 5/7] vfio/nvgrace-gpu: split the code to wait for GPU
ready
>> - do {
>> - if ((ioread32(io + C2C_LINK_BAR0_OFFSET) == STATUS_READY) &&
>> - (ioread32(io + HBM_TRAINING_BAR0_OFFSET) == STATUS_READY)) {
>> - ret = 0;
>> - goto reg_check_exit;
>> - }
>> - msleep(POLL_QUANTUM_MS);
>> - } while (!time_after(jiffies, timeout));
>> + ret = nvgrace_gpu_wait_device_ready(io);
>
> I think you're inadvertently fixing a bug here too. The ret
> initialization to -ETIME is immediately clobbered by
> pci_enable_device(), so exceeding the timeout would never generate an
> error. Now it will:
>
> Fixes: d85f69d520e6 ("vfio/nvgrace-gpu: Check the HBM training and C2C link status")
Oh yeah. Will add this line in the commit message.
> Also we should remove the ret initialization. Otherwise the series
> LGTM. Thanks,
>
> Alex
Thank you very much for the review, Alex!
Powered by blists - more mailing lists