Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Gerd Hoffmann wrote:
> On 08/10/09 15:02, Anthony Liguori wrote:
>
>> I think you're missing my fundamental point. Don't use the kernel as the
>> guest interface.
>>
>> Introduce a userspace daemon that exposes a domain socket. Then we can
>> have a proper protocol that uses reverse fqdns for identification.
>
> We need nothing but (a) bidirectional byte streams and (b) name tags 
> for them.
>
> Do we really want design a daemon and a protocol for such a simple thing?

Yes, because we also need (c) the ability to write cross platform 
software that targets vmchannel.

So having a library interface is going to be extremely desirable.

Also, see the previous discussion about security.  How do you sanely 
delegate /dev/vmchannel/org/qemu/clipboard to the current Xorg user?

>   Especially as requiring a daemon for that adds a few problems you 
> don't have without them.  Access control for example:  For device 
> nodes you can just use standard unix permissions and acls.

But how do you set those permissions in the first place?

>   You can easily do stuff like adding the logged in desktop user to 
> the /dev/vmchannel/org/qemu/clipboard acl using existing solutions.  
> With a daemon you have to hop through a number of loops to archive the 
> same.
>
> Can't we simply have guest apps open "/dev/vmchannel/$protocol" ?

/dev interfaces are only simple to kernel developers :-)  Besides, why 
do something that can be clearly done in userspace within the kernel?  
It just increases the possibility of kernel bugs.

You can have a /var/run/vmchannel/$protocol.sock unix domain socket and 
it has all the same properties that you describe.  It also Just Works 
with standard tools like socat.  You can transparently route it over the 
network, have it work over slirp, a serial device, or some custom virtio 
device if we so choose.

It's the only sane way to support older guests too.  If we really want 
vmchannel to be used by application developers, then we really need a 
libvmchannel.

Regards,

Anthony Liguori

> cheers,
>   Gerd
>

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization

[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux