2018. augusztus 23., csütörtök 21:50:54 UTC+2 időpontban [email protected] 
a következőt írta:
>
> I copied the whole thing to https://github.com/sbezverk/vfio 
>
> Running it without actual vfio/iommu might be problematic though. 
>
> Before this specific ioctl can be run 2 open calls must succeed. See func 
> main. 
>
> Thank you for looking into this problem 
> Serguei 
>
> Sent from my iPhone 
>
> > On Aug 23, 2018, at 12:49 PM, Tamás Gulácsi <[email protected] 
> <javascript:>> wrote: 
> > 
> > Cany you give a complete example? 
> > 
> >  https://play.golang.org/p/ZQSf-PwMtd9 
> > 
> > says 
> > 
> >  "device=18446744073709551615 errno=inappropriate ioctl for device" 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "golang-nuts" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an email to [email protected] <javascript:>. 
> > For more options, visit https://groups.google.com/d/optout. 
>

Ok, clearly I cannot test it - either I don't have the required setup, or 
the needed knowledge of what the hell is VFIO.

Some googling around says:

VFIO_GROUP_GET_DEVICE_FD - _IOW(VFIO_TYPE, VFIO_BASE + 6, char) * * Return a 
new file descriptor for the device object described by * the provided string.  
The string should match a device listed in * the devices subdirectory of the 
IOMMU group sysfs entry.  The * group containing the device must already be 
added to this context. * Return: new file descriptor on success, -errno on 
failure. * Availability: When attached to container */

The strange thing in vfio.go GetGroupFD is the use of *string - as you don't 
want to modify that path, you shouldn't use a pointer.
But that's nothing to do with the ioctl.

The fill of buffer, and the use seems legit.

IF you have a working C program, I'd try to strace both C and Go and see what's 
different.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to