From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M0uOv-0007P6-CH for qemu-devel@nongnu.org; Mon, 04 May 2009 05:23:53 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M0uOq-0007Jr-21 for qemu-devel@nongnu.org; Mon, 04 May 2009 05:23:52 -0400 Received: from [199.232.76.173] (port=41041 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M0uOp-0007Jf-Nj for qemu-devel@nongnu.org; Mon, 04 May 2009 05:23:47 -0400 Received: from mail-ew0-f165.google.com ([209.85.219.165]:62862) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M0uOp-0005PX-EX for qemu-devel@nongnu.org; Mon, 04 May 2009 05:23:47 -0400 Received: by ewy9 with SMTP id 9so3329605ewy.34 for ; Mon, 04 May 2009 02:23:45 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <5C92D599-FCA8-4C38-8863-20544C1AB520@theiggy.com> Date: Mon, 4 May 2009 12:23:45 +0300 Message-ID: <1295ed070905040223m3e4f08cq259c4ab696b7ef44@mail.gmail.com> Subject: Re: [Qemu-devel] virtio documentation or BSD licensed driver? From: Pantelis Koukousoulas Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: higepon Cc: Brian Jackson , qemu-devel@nongnu.org >>> Is there any >>> - interface documentation for virtio? >>> - BSD licensed drivers? Virtio was designed as a Linux API AFAIK (nothing prevents it from being ported of course). So, the most useful info should be in the (BSD Licensed) headers. The actual virtio-net driver code will not be very helpful to someone unfamilliar with the way Linux does things (e.g., skbs, ethernet operations etc etc). If you want to port virtio-net to another OS though, you will have to provide the infrastructure too, so you have 2 choices: 1) Implement it like in Linux in 4 layers: virtio_pci, virtio_ring, virtio (virtqueues etc), virtio_net. 2) Think of virtio-net as just another (sophisticated) PCI driver and look at its implemenation in qemu. Although qemu is not BSD licensed, your work is unlikely to be considered a derivative of qemu since you are implementing a driver for that virtual "hardware", not another copy it. The BSD virtio headers, the paper and the virtio-net qemu implementation should be enough to allow you to write a driver for your OS imho (it is already more info than you typically get for real hardware) Pantelis P.S., in practice I believe several developers for other OSes look at the sources of linux drivers as sort of a really good documentation for hardware, even if the license of their OS is incompatible. IANAL and all that, but I 'd be really suprised if you got sued for porting virtio-net to your hobby OS :) (E.g., there are currently closed-source windows virtio-net drivers and nobody cared to request an audit whether they are a derivative of the Linux drivers or not).