Yeah, there is no owner check in vhost_vring_ioctl().I may miss something, it looks to me the there's no owner check inGood point. It's better to reject these ioctls for now.+ default:If we don't even use them, there's probably no need to call
+ /*
+ * VHOST_SET_MEM_TABLE, VHOST_SET_LOG_BASE, and
+ * VHOST_SET_LOG_FD are not used yet.
+ */
vhost_dev_ioctl(). This may help to avoid confusion when we want to develop
new API for e.g dirty page tracking.
PS. One thing I may need to clarify is that, we need the
VHOST_SET_OWNER ioctl to get the vq->handle_kick to work.
So if we don't call vhost_dev_ioctl(), we will need to
call vhost_dev_set_owner() directly.
vhost_vring_ioctl() and the vhost_poll_start() can make sure handle_kick
works?
IIUC, vhost_poll_start() will start polling the file. And when
event arrives, vhost_poll_wakeup() will be called, and it will
queue work to work_list and wakeup worker to finish the work.
And the worker is created by vhost_dev_set_owner().