Re: [PATCH v7 1/1] vfio/nvgpu: Add vfio pci variant module for grace hopper

From: Jason Gunthorpe
Date: Wed Aug 30 2023 - 15:23:57 EST


On Wed, Aug 30, 2023 at 06:50:32AM -0700, Christoph Hellwig wrote:
> I know I'm chiming in a bit late, but what ultimate user space is going
> to use this? We should not add anything to the kernel that can't
> be used without fully open user space.

qemu will get the matching VFIO userspace patches, I think they were
posted someplace already.

> vfio has traditionally been a bit special as it "just" passes devices
> through, so any user space could just be a user space driver for a
> random device on $FOO bus, including an actual Linux driver in a VM,
> but this driver has very specific semantics for a very specific piece
> of hardware, so it really needs to be treated like a generic GPU driver
> or accelerator driver.

This is basically a pre-CXL driver. It takes a PCI device and some
non-standard CXL-ish metadata and adapts it to VFIO.

In a post-CXL world this same functionality of managing the 'cache
coherent BAR' for VFIO would be done generically by some generic
vfio-cxl driver.

Jason