On Sun, Apr 8, 2012 at 4:13 AM, Nadav Har'El <nyh@xxxxxxxxxxxxxxxxxxx> wrote: > On Sat, Apr 07, 2012, Steven wrote about "source for virt io backend driver": >> Hi, >> I would like to know where I can find the source for backend driver of >> virtio device. For example, I know that the front-end net driver is >>... >> Can anyone help to point out where the source of net virtio backend in >> the host kernel? > > If you use "normal" virtio, the backend is in qemu, i.e., host user > space, *not* in the host kernel. So you need to look for it in qemu, > not kvm. > > If you want the backend to be in the kernel, then you probably mean > vhost-net. This you can find in drivers/vhost/net.c (and > drivers/vhost/vhost.c for the generic vhost infrastructure for virtio > drivers in the host kernel). Yes, I am looking for the backend code in the kernel. I found the file for net backend drivers/vhost/net.c. However, the backend code for blk is not there. Could you point out this? Thanks. By the way, I found the front-end blk code in drivers/block/virtio_blk.c > > Of course, also with vhost-net, qemu is involved in setting up this > device. But qemu doesn't need to get involved in the data path (data, > interrupts, etc.) which is done completely in the kernel, and therefore > much more efficiently. > > -- > Nadav Har'El | Sunday, Apr 8 2012, > nyh@xxxxxxxxxxxxxxxxxxx |----------------------------------------- > Phone +972-523-790466, ICQ 13349191 |Lottery: You need a dollar and a dream. > http://nadav.harel.org.il |We'll take the dollar, you keep the dream. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html