Re: [PATCH 4/7] rust: vfio: add PCI variant driver abstractions

From: Simon Song

Date: Tue Oct 06 2026 - 17:42:33 EST


On 9/30/2026 6:57 AM, Zhi Wang wrote:

> + bindings::vfio_pci_core_register_device(
> + self.dev.core_device(),
> + Some(PciCallbacks::<D>::vga_set_decode),
> + )

Hi Zhi,

When rebase this series onto v3 of my VFIO core drvdata patch, please modify this helper with only self.dev.core_device(), the vfio core now select the VGA callback internally.

See the V3 changes here:
https://lore.kernel.org/kvm/20261005184236.1946167-1-xinmengs@xxxxxxxxxx/

> + // SAFETY: The registered device owns its error notification state.
> + unsafe { bindings::vfio_pci_core_aer_err_detected(reg.dev.core_device(), state) }

The AER helper now takes only a single argument which is core_device(), please drop the second argument here and in reset(done)

> + const PM_OPS: bindings::dev_pm_ops = bindings::dev_pm_ops {
> + runtime_suspend: Some(Self::runtime_suspend),
> + runtime_resume: Some(Self::runtime_resume),
> + ..pin_init::zeroed()
> + };

please also guard the PM functions with CONFIG_PM to match VFIO core helpers

Thanks,
Simon