Received: from eggs.gnu.org ([209.51.188.92]:36557) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hEOYQ-0003a3-3X for qemu-devel@nongnu.org; Wed, 10 Apr 2019 21:31:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hEOYP-0007gv-2y for qemu-devel@nongnu.org; Wed, 10 Apr 2019 21:31:01 -0400 Received: from mail-qk1-f195.google.com ([209.85.222.195]:44790) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hEOYO-0007gk-Tv for qemu-devel@nongnu.org; Wed, 10 Apr 2019 21:31:01 -0400 Received: by mail-qk1-f195.google.com with SMTP id y5so2484433qkc.11 for ; Wed, 10 Apr 2019 18:31:00 -0700 (PDT) Date: Wed, 10 Apr 2019 21:30:56 -0400 From: "Michael S. Tsirkin" Message-ID: <20190410213001-mutt-send-email-mst@kernel.org> References: <20190401111843.54528-1-ybettan@redhat.com> <20190409131734.GE16944@stefanha-x1.localdomain> <1871f593-ec5b-fede-7da5-a7ae78056249@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [RFC-PATCH] Introducing virtio-example device. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: Yoni Bettan , qemu-devel , Amnon Ilan , Eduardo Habkost On Wed, Apr 10, 2019 at 08:15:32PM +0100, Stefan Hajnoczi wrote: > On Wed, Apr 10, 2019 at 4:45 PM Yoni Bettan wrote: > > On 4/9/19 4:17 PM, Stefan Hajnoczi wrote: > > > On Mon, Apr 01, 2019 at 02:18:43PM +0300, Yoni Bettan wrote: > > The final purpose is to have: > > > > 1. device specification > > > > 2. device implementation > > > > 3. device driver > > > > 4. blog > > > > maybe I should have written it at the beginning, this is not the entire > > project but it is its start. > > The way I'd design VIRTIO devices without prior knowledge is: > > 1. Learn the VIRTIO device model. Understand the concepts in VIRTIO. > <-- this is hard today, there's not much good documentation Best doc is still probably Rusty's whitepaper. It only covers 0.X spec so somewhat outdated but it does explain the concepts I think. > 2. Design an initial version of the device spec. Mostly configuration > layout, virtqueues, and request structs. Not much text is necessary > at this point, but it's critical for thinking through features before > implementation. > > 3. Implement guest driver and device emulation. > > 4. Iterate on spec and implementation until it's functionally complete. > > 5. Submit the spec to the VIRTIO Technical Committee. > > 6. Submit driver and device emulation patches. They can be merged > when the spec is approved/close to approved. > > Are you jumping to #3? This is likely to lead to poor quality > implementations and specs because the fundamental VIRTIO concepts > weren't understood. > > If the point is to educate others and/or do it "the right way", then I > would really avoid hacking around without first doing the other steps. > > Stefan