mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Simon Song <xinmengs@nvidia.com>
To: alex@shazbot.org, jgg@nvidia.com
Cc: dakr@kernel.org, acourbot@nvidia.com, yishaih@nvidia.com,
	skolothumtho@nvidia.com, kevin.tian@intel.com,
	jhubbard@nvidia.com, ecourtney@nvidia.com, cjia@nvidia.com,
	smitra@nvidia.com, kjaju@nvidia.com, alkumar@nvidia.com,
	ankita@nvidia.com, aniketa@nvidia.com, kwankhede@nvidia.com,
	targupta@nvidia.com, linux-kernel@vger.kernel.org,
	kvm@vger.kernel.org, zhiwang@kernel.org, zhiw@nvidia.com
Subject: Re: [PATCH v2 0/1] vfio/pci: Give drivers control of PCI driver_data
Date: Wed, 30 Sep 2026 11:32:00 -0400	[thread overview]
Message-ID: <d90ce22d-3acd-42a3-89a2-fa9c53c95034@nvidia.com> (raw)
In-Reply-To: <20260930143641.4160785-1-xinmengs@nvidia.com>

On 9/30/2026 10:36 AM, Simon Song wrote:
> Hi All,
> 
> During the discussion of the proposed Rust NVIDIA vGPU VFIO variant
> driver [1], Danilo mentioned that vfio-pci-core requires pci driver_data
> to point to vfio_pci_core_device, this conflicts with driver data
> managed by proposed nvidia vfio variant driver.
> 
> This patch moves the responsibility for interpreting driver_data to the
> pci driver, the vfio core functions (PM, AER, VGA) takes an explicit
> vfio_pci_core_device pointer and no longer depend on pci driver_data
> 
> VFIO_PCI_CORE_DEFINE_CALLBACK marcos generate the wrappers for existing
> vfio variant drivers, each driver also assigns its own PM ops table to
> replace the operation done by vfio-pci-core during registration.
> 
> For VGA, drivers provide its decode callback to
> vfio_pci_core_register_device, VGA setup/teardown remains inside vfio
> core registration/unregistration, this preserves vga initialize
> sequence and also remove the core dependacy on driver data.
> 
> 
> [1] https://lore.kernel.org/all/DLFD2ZDSK9YQ.3A4R66G8UJMD8@kernel.org/
> 
> Simon Song (1):
>   vfio/pci: Remove the core dependency on driver data
> 
>  .../vfio/pci/hisilicon/hisi_acc_vfio_pci.c    | 27 ++++-----
>  drivers/vfio/pci/ism/main.c                   | 19 +++---
>  drivers/vfio/pci/mlx5/main.c                  | 13 ++--
>  drivers/vfio/pci/nvgrace-gpu/main.c           | 19 +++---
>  drivers/vfio/pci/pds/pci_drv.c                |  8 ++-
>  drivers/vfio/pci/pds/vfio_dev.c               |  5 +-
>  drivers/vfio/pci/qat/main.c                   | 12 ++--
>  drivers/vfio/pci/vfio_pci.c                   | 33 +++++++++-
>  drivers/vfio/pci/vfio_pci_core.c              | 60 +++++++------------
>  drivers/vfio/pci/virtio/main.c                |  8 ++-
>  drivers/vfio/pci/xe/main.c                    |  8 ++-
>  include/linux/vfio_pci_core.h                 | 42 ++++++++++++-
>  12 files changed, 160 insertions(+), 94 deletions(-)
> 

Hi All,

I forgot to include "changes since v1" from the cover letter, see below:

Changes since v1:
- Extend VFIO_PCI_CORE_DEFINE_CALLBACKS() to accept the driver's private
  structure type and its member (Jason, Alex)
- Select VGA decode callbacks inside vfio-core and restore to use 1-argument
  vfio_pci_core_register_device() interface
- For vfio variant driver, store its private driver_data to pdev instead of
  the vfio core driver data

Thanks,
Simon

      parent reply	other threads:[~2026-09-30 15:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 14:36 Simon Song
2026-09-30 14:36 ` [PATCH v2 1/1] vfio/pci: Remove the core dependency on driver data Simon Song
2026-09-30 17:40   ` Danilo Krummrich
2026-09-30 15:32 ` Simon Song [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d90ce22d-3acd-42a3-89a2-fa9c53c95034@nvidia.com \
    --to=xinmengs@nvidia.com \
    --cc=acourbot@nvidia.com \
    --cc=alex@shazbot.org \
    --cc=alkumar@nvidia.com \
    --cc=aniketa@nvidia.com \
    --cc=ankita@nvidia.com \
    --cc=cjia@nvidia.com \
    --cc=dakr@kernel.org \
    --cc=ecourtney@nvidia.com \
    --cc=jgg@nvidia.com \
    --cc=jhubbard@nvidia.com \
    --cc=kevin.tian@intel.com \
    --cc=kjaju@nvidia.com \
    --cc=kvm@vger.kernel.org \
    --cc=kwankhede@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skolothumtho@nvidia.com \
    --cc=smitra@nvidia.com \
    --cc=targupta@nvidia.com \
    --cc=yishaih@nvidia.com \
    --cc=zhiw@nvidia.com \
    --cc=zhiwang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®