From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Brook Subject: Re: [Qemu-devel] virtio-serial: A guest <-> host interface for simple communication Date: Tue, 23 Jun 2009 15:16:13 +0100 Message-ID: <200906231516.15470.paul@codesourcery.com> References: <1245760953-32139-1-git-send-email-amit.shah@redhat.com> <200906231355.53557.paul@codesourcery.com> <200906231558.33794.borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: virtualization@lists.linux-foundation.org, qemu-devel@nongnu.org, Amit Shah , kvm@vger.kernel.org To: Christian =?iso-8859-1?q?Borntr=E4ger?= Return-path: Received: from mail.codesourcery.com ([65.74.133.4]:42459 "EHLO mail.codesourcery.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751916AbZFWOQP convert rfc822-to-8bit (ORCPT ); Tue, 23 Jun 2009 10:16:15 -0400 In-Reply-To: <200906231558.33794.borntraeger@de.ibm.com> Content-Disposition: inline Sender: kvm-owner@vger.kernel.org List-ID: On Tuesday 23 June 2009, Christian Borntr=E4ger wrote: > Am Dienstag 23 Juni 2009 14:55:52 schrieb Paul Brook: > > > Here are two patches. One implements a virtio-serial device in qe= mu > > > and the other is the driver for a guest kernel. > > > > So I'll ask again. Why is this separate from virtio-console? > > I did some work on virtio-console, since kvm on s390 does not provide= any > other. I dont think we should mix two different types of devices into= one > driver. The only thing that these drivers have in common, is the fact= that > there are two virtqueues, piping data (single bytes or larger chunks)= =2E So > you could make the same argument with the first virtio_net driver (th= e one > before GSO) - which is obviously wrong. The common part of the transp= ort is > already factored out to virtio_ring and the transports. virtio-net is packet based, not stream based. > In addition there are two ABIs involved: a userspace ABI (/dev/hvc0) = and a > guest/host ABI for this console. (and virtio was not meant to be a KV= M-only > interface, that we can change all the time). David A. Wheeler's 'SLOC= Count' > gives me 141 lines of code for virtio_console.c. I am quite confident= that > the saving we could achieve by merging these two drivers is not worth= the > hazzle. AFAICS the functionality provided is exactly the same. The host API is=20 identical, and the guest userspace API only has trivial differences (wh= ich=20 could be eliminated with a simple udev rule). By my reading virtio-seri= al=20 makes virtio-console entirely redundant. > Discussion about merging the console code into this distracts from th= e main > problem: To get the interface and functionality right before it becom= es an > ABI (is it /dev/ttyS, network like or is it something completely > different?). Ah, now that's a different question. I don't know what the requirements= are=20 for the higher level vmchannel interface. However I also don't care. Paul