Re: [kvm-devel] [PATCH 3/6] virtio net driver

2007-09-21 Thread Herbert Xu
On Fri, Sep 21, 2007 at 02:36:43PM +0200, Christian Borntraeger wrote: > > @@ -335,7 +344,7 @@ static void *virtnet_probe(struct device > dev->poll = virtnet_poll; > dev->hard_start_xmit = start_xmit; > dev->weight = 16; > - dev->features = NETIF_F_HIGHDMA; > + dev->featur

Re: [kvm-devel] [PATCH 3/6] virtio net driver

2007-09-21 Thread Christian Borntraeger
Am Donnerstag, 20. September 2007 schrieb Rusty Russell: > The network driver uses *two* virtqueues: one for input packets and > one for output packets. This has nice locking properties (ie. we > don't do any for recv vs send). [...] > 3) Resolve freeing of old xmit skbs (someone sent patch

Re: [kvm-devel] [PATCH 3/6] virtio net driver

2007-09-21 Thread Christian Borntraeger
Am Freitag, 21. September 2007 schrieb Herbert Xu: > Please don't use LLTX in new drivers. We're trying to get rid > of it since it's > > 1) unnecessary; > 2) causes problems with AF_PACKET seeing things twice. Ok, but then I cannot reuse the xmit lock in an interrupt handler. Otherwise deadloc

Re: [kvm-devel] [PATCH 3/6] virtio net driver

2007-09-21 Thread Christian Borntraeger
Am Freitag, 21. September 2007 schrieb Rusty Russell: > Can't we just re-use the default xmit lock? yes we can. This patch is untested but is basically an refresh of an ealier version. I currently have no code testable with the latest virtio version from this mail thread, so if you could apply

Re: [PATCH 1/6] virtio interace

2007-09-21 Thread Arnd Bergmann
On Friday 21 September 2007, Rusty Russell wrote: > Hmm, I guess we could have a PCI driver which claims all VIRTIO vendor > devices.   yes, that was the idea. > Then it can call virtio_find_driver() (?) at the top of its > probe function to find if there's a matching virtio driver.   > This PCI

Re: [PATCH 1/6] virtio interace

2007-09-21 Thread Rusty Russell
On Fri, 2007-09-21 at 14:05 +0200, Arnd Bergmann wrote: > On Thursday 20 September 2007, Rusty Russell wrote: > > +int register_virtio_driver(struct virtio_driver *drv); > > +void unregister_virtio_driver(struct virtio_driver *drv); > > + > > +/* The particular virtio backend supplies these. */ > >

Re: [PATCH 4/6] virtio block driver

2007-09-21 Thread Rusty Russell
On Fri, 2007-09-21 at 13:47 +0200, Jens Axboe wrote: > On Fri, Sep 21 2007, Rusty Russell wrote: > > On Thu, 2007-09-20 at 15:05 +0200, Jens Axboe wrote: > > > We have end_queued_request(), lets add end_dequeued_request(). Below. > > > > OK, thanks, I'll throw that in the mix and test... > > I've

Re: [PATCH 4/6] virtio block driver

2007-09-21 Thread Jens Axboe
On Fri, Sep 21 2007, Rusty Russell wrote: > On Thu, 2007-09-20 at 14:27 +0200, Jens Axboe wrote: > > On Thu, Sep 20 2007, Rusty Russell wrote: > > > The block driver uses scatter-gather lists with sg[0] being the > > > request information (struct virtio_blk_outhdr) with the type, sector > > > and i

Re: [kvm-devel] [PATCH 6/6] virtio ring helper

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 14:43 +0200, Avi Kivity wrote: > Rusty Russell wrote: > > These helper routines supply most of the virtqueue_ops for hypervisors > > which want to use a ring for virtio. Unlike the previous lguest > > implementation: > > > > 3) The page numbers are always 64 bit (PAE anyone?)

Re: [PATCH 1/6] virtio interace

2007-09-21 Thread Arnd Bergmann
On Thursday 20 September 2007, Rusty Russell wrote: > + * virtio_driver - operations for a virtio I/O driver > + * @name: the name of the driver (KBUILD_MODNAME). > + * @owner: the module which contains these routines (ie. THIS_MODULE). > + * @id_table: the ids (we re-use PCI ids) serviced by this

Re: [PATCH 4/6] virtio block driver

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 14:27 +0200, Jens Axboe wrote: > On Thu, Sep 20 2007, Rusty Russell wrote: > > The block driver uses scatter-gather lists with sg[0] being the > > request information (struct virtio_blk_outhdr) with the type, sector > > and inbuf id. The next N sg entries are the bio itself,

Re: [kvm-devel] [PATCH 3/6] virtio net driver

2007-09-21 Thread Rusty Russell
On Fri, 2007-09-21 at 12:48 +0200, Christian Borntraeger wrote: > Am Donnerstag, 20. September 2007 schrieb Rusty Russell: > > The network driver uses *two* virtqueues: one for input packets and > > one for output packets. This has nice locking properties (ie. we > > don't do any for recv vs send)

Re: [PATCH 4/6] virtio block driver

2007-09-21 Thread Jens Axboe
On Fri, Sep 21 2007, Rusty Russell wrote: > On Thu, 2007-09-20 at 15:05 +0200, Jens Axboe wrote: > > On Thu, Sep 20 2007, Rusty Russell wrote: > > > +static void end_dequeued_request(struct request *req, > > > + struct request_queue *q, int uptodate) > > > +{ > > > + /* And

Re: [PATCH 0/6] virtio with config abstraction and ring implementation

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 15:43 +0200, Dor Laor wrote: > Rusty Russell wrote: > > Drivers now unpack their own configuration: their probe() methods > > are > > uniform. The configuration mechanism is extensible and can be backed by > > PCI, a string of bytes, or something else. > I like th

Re: [kvm-devel] [PATCH 1/6] virtio interace

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 14:27 +0200, Avi Kivity wrote: > Rusty Russell wrote: > > +struct virtio_backend_ops virtio_backend_ops; > > +EXPORT_SYMBOL_GPL(virtio_backend_ops); > > Suggest calling this virtio_transport_ops rather than the too-generic > virtio_backend_ops. Especially since Xen uses ba

Re: [PATCH 4/6] virtio block driver

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 15:05 +0200, Jens Axboe wrote: > On Thu, Sep 20 2007, Rusty Russell wrote: > > +static void end_dequeued_request(struct request *req, > > +struct request_queue *q, int uptodate) > > +{ > > + /* And so the insanity of the block layer infects us her

Re: [kvm-devel] [PATCH 2/6] virtio_config

2007-09-21 Thread Rusty Russell
On Thu, 2007-09-20 at 14:55 +0200, Avi Kivity wrote: > Avi Kivity wrote: > > Rusty Russell wrote: > >> Previous versions of virtio didn't commonalize probing. For every > >> driver, every virtio implementation (KVM, lguest, etc) needed an > >> in-kernel stub to join their bus to the probe code. >