[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJHc60y4OiYX+CjOXphXraWYPXZMb-aHJ6WnbNJwGiNDje=8PA@mail.gmail.com>
Date: Thu, 8 Jan 2026 13:47:39 -0800
From: Raghavendra Rao Ananta <rananta@...gle.com>
To: David Matlack <dmatlack@...gle.com>
Cc: Alex Williamson <alex@...zbot.org>, Alex Williamson <alex.williamson@...hat.com>,
Josh Hilke <jrhilke@...gle.com>, kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 4/6] vfio: selftests: Export more vfio_pci functions
On Wed, Jan 7, 2026 at 3:05 PM David Matlack <dmatlack@...gle.com> wrote:
>
> On 2025-12-10 06:14 PM, Raghavendra Rao Ananta wrote:
>
> > -static void vfio_device_bind_iommufd(int device_fd, int iommufd,
> > - const char *vf_token)
> > +int __vfio_device_bind_iommufd(int device_fd, int iommufd, const char *vf_token)
> > {
> > struct vfio_device_bind_iommufd args = {
> > .argsz = sizeof(args),
> > @@ -314,7 +322,15 @@ static void vfio_device_bind_iommufd(int device_fd, int iommufd,
> > args.token_uuid_ptr = (u64)token_uuid;
> > }
> >
> > - ioctl_assert(device_fd, VFIO_DEVICE_BIND_IOMMUFD, &args);
> > + return ioctl(device_fd, VFIO_DEVICE_BIND_IOMMUFD, &args);
>
> For ioctls that return 0 on success and -1 on error, let's follow the
> precedent set in iommu.c and return -errno on error from our library
> functions. i.e.
>
> if (ioctl(device_fd, VFIO_DEVICE_BIND_IOMMUFD, &args))
> return -errno;
>
> return 0;
Sure, will take care of this in v3.
Powered by blists - more mailing lists