[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC-PATCH] Introducing virtio-example device.
From: |
Michael S. Tsirkin |
Subject: |
Re: [Qemu-devel] [RFC-PATCH] Introducing virtio-example device. |
Date: |
Wed, 10 Apr 2019 21:30:56 -0400 |
On Wed, Apr 10, 2019 at 08:15:32PM +0100, Stefan Hajnoczi wrote:
> On Wed, Apr 10, 2019 at 4:45 PM Yoni Bettan <address@hidden> 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