On Fri, Apr 04, 2025 at 04:36:47PM +0200, Cédric Le Goater wrote: > On 2/19/25 15:48, John Levon wrote: > > From: Jagannathan Raman <jag.ra...@oracle.com> > > > > For vfio-user, device operations such as IRQ handling and region > > read/writes are implemented in userspace over the control socket, not > > ioctl() or read()/write() to the vfio kernel driver; add an ops vector > > to generalize this, and implement vfio_dev_io_ioctl for interacting > > with the kernel vfio driver. > > > > The ops consistently use the "-errno" return style, as the vfio-user > > implementations get their errors from response messages not from the > > kernel; adjust the callers to handle this as necessary. > > Please adjust the callers before introducing the new ops.
As in change things like vfio_enable_vectors() to be "return -errno" style as a preparatory change ? I can do that > > +/* > > + * Traditional ioctl() based io > > + */ > > + > > +static int vfio_io_device_feature(VFIODevice *vbasedev, > > + struct vfio_device_feature *feature) > > 'vfio_device' prefix ? vfio_device_io_device_feature. Minor since it's > local to the file. Sure. Actually I don't really like "io" here either, but not sure of a better prefix. "vfio_device_kern" ?? Getting a bit long winded. > Just minor changes. Looks good. I'll pick up all your other naming suggestions too regards john