On 01/09/2015 02:41 PM, Ouyang, Changchun wrote: > > Hi all, > > I have a question about the control queue in qemu, > > When the qemu have configured the control queue, and guest also > negotiated the control queue successfully with qemu, > > Will the qemu will let vhost know guest try to use control queue to > send some commands? >
Currently not. Vhost is only in charge of data path so control virtqueue is still handled by qemu. So the filtering does not even work if vhost is used. The plan is let management (libvirt) to be notified when guest want to do filtering. And then libvirt can configure the filter of host devices. > > > > Or could the vhost also setup the control queue to communicate > directly with control queue on guest? > Technically, we can. > > How to do that? > Just do like what we did for rx virtqueue and tx virtqueue. But I see several issues: - For security reason, qemu was usually run as non-privileged process. This means vhost kernel thread does not have the privilege to configure filter in host. - Vhost kernel thread know little about the backend (which could be tun/macvtap or even packet socket). But for vhost-user implementation, it may make sense but I'm not sure. > > Hope anyone could shed some lights on this question. > > Thanks in advance! > > > > Thanks > > Changchun >