From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: [PATCH][RFC] vmchannel a data channel between host and guest. Date: Tue, 14 Oct 2008 11:05:40 +0200 Message-ID: <20081014090540.GB13153@redhat.com> References: <20081012124534.GK11435@redhat.com> <48F39443.4070203@codemonkey.ws> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: kvm@vger.kernel.org, Anthony Liguori , Rusty Russell To: Anthony Liguori Return-path: Received: from il.qumranet.com ([212.179.150.194]:16599 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753025AbYJNJFm (ORCPT ); Tue, 14 Oct 2008 05:05:42 -0400 Content-Disposition: inline In-Reply-To: <48F39443.4070203@codemonkey.ws> Sender: kvm-owner@vger.kernel.org List-ID: On Mon, Oct 13, 2008 at 01:32:35PM -0500, Anthony Liguori wrote: > Gleb Natapov wrote: >> Hello, >> >> Sometimes there is a need to pass various bits of information between host >> and guest (mostly for management purposes such as host screen resolution >> changes or runtime statistics of a guest). To do that we need some way to >> pass data between host and guest. Attached patch implements vmchannel that can >> be used for this purpose. It is based on virtio infrastructure and >> support more then one channel. The vmchannel presents itself as PCI >> device to a guest so guest driver is also required. The one for linux is >> attached. It uses netlink connector to communicate with userspace. >> > > Essentially, the transport itself ends up looking very much like a > network device so the only real design question is what the guest and > host interfaces look like. I don't know that a netlink interface is the > best interface to userspace. Why not a full blown socket? Perhaps a > virtual file system? > netlink was designed to be interface to userspace and is used like this by different subsystems (not just network). What full blown socket (and by that I presume you mean new address family) will give you over netlink? File system? We need a simple stream semantics is this justify another virtual file system? The choice was between char device and netlink. Nelink was simpler and gives broadcast as a bonus. > Having a limit of only 4 links seems like a problem to me too. > This can be easily extended. > I think there needs to be a better articulation about why other > interfaces cannot be used (like a network device). Is it because of > ease of guest configuration? Is it performance? Performance is not the reason. Actually vmchannel doesn't need performance of a network device that is why its implementation is much simpler. The main reasons to not use network is that we want to support configurations where there is no network connectivity between host and guest. We want to have communication channel available to us even if guest network stack is misconfigured (actually we may use vmchannel to configure guest networking). And if we will allocate separate network device for guest <-> host communication this will be visible to various guest components that may interfere with it (firewalls, antiviruses). -- Gleb.