On Tue, 7 Jun 2022 at 14:32, Elena <elena.ufimtseva@xxxxxxxxxx> wrote: > On Mon, Jun 06, 2022 at 03:57:47PM +0100, Stefan Hajnoczi wrote: > > The downside is it requires more code than general purpose I/O. In > > addition to ->uring_cmd(), it's also worth implementing struct > > file_operations read/write/poll so traditional file I/O syscalls work > > for simple applications that don't want to use io_uring. > > > > It's possible to add ->uring_cmd() later but as a userspace developer I > > would prefer the ->uring_cmd() approach, so I'm not sure it's worth > > committing to the existing userspace-provided file approach? > > Makes total sense. I am going to start working on this and will > come back with more questions. Good to hear! Userspace needs a way to create these fds. I think a new ioctl(KVM_CREATE_IOREGIONFD) is needed. Then the fd can be passed back to KVM_SET_IOREGION. Stefan