Messages in this thread | | | Date | Wed, 02 Jun 2010 08:08:34 +0300 | From | Avi Kivity <> | Subject | Re: [PATCH] VFIO driver: Non-privileged user level PCI drivers |
| |
On 06/02/2010 07:59 AM, Tom Lyon wrote: > > This is just what I was thinking. But rather than a get/set, just use two fds. > > ioctl(vfio_fd1, VFIO_SET_DOMAIN, vfio_fd2); > > This may fail if there are really 2 different IOMMUs, so user code must be > prepared for failure, In addition, this is strictlyupwards compatible with > what is there now, so maybe we can add it later. > >
What happens if one of the fds is later closed?
I don't like this conceptually. There is a 1:n relationship between the memory map and the devices. Ignoring it will cause the API to have warts. It's more straightforward to have an object to represent the memory mapping (and talk to the iommus), and have devices bind to this object.
-- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.
| |