Re: Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Mon, Oct 08, 2012 at 12:51:25PM +1030, Rusty Russell wrote: >> Note before anyone gets confused; we were talking about using the PCI >> config space to indicate what BAR(s) the virtio stuff is in. An >> alternative would be to simply specify a new layout format i

[PATCH] virtio-pci: use module_pci_driver to simplify the code

2012-10-10 Thread Wei Yongjun
From: Wei Yongjun Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun --- drivers/virtio/virtio_pci.c | 14 +- 1

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
Rusty Russell writes: > Jamie Lokier writes: > >> Rusty Russell wrote: >>> I don't think it'll be that bad; reset clears the device to unknown, >>> bar0 moves it from unknown->legacy mode, bar1/2/3 changes it from >>> unknown->modern mode, and anything else is bad (I prefer being strict so >>> we

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
"Michael S. Tsirkin" writes: > On Wed, Oct 10, 2012 at 08:36:12AM -0500, Anthony Liguori wrote: >> Rusty Russell writes: >> >> > Gerd Hoffmann writes: >> >> So how about this: >> >> >> >> (1) Add a vendor specific pci capability for new-style virtio. >> >> Specifies the pci bar used for new

Re: [PATCH 0/3] virtio-net: inline header support

2012-10-10 Thread Rusty Russell
Paolo Bonzini writes: > Il 09/10/2012 06:59, Rusty Russell ha scritto: >> Paolo Bonzini writes: >>> Il 05/10/2012 07:43, Rusty Russell ha scritto: That's good. But virtio_blk's scsi command is insoluble AFAICT. As I said to Anthony, the best rules are "always" and "never", so I'd real

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Michael S. Tsirkin
On Wed, Oct 10, 2012 at 08:36:12AM -0500, Anthony Liguori wrote: > Rusty Russell writes: > > > Gerd Hoffmann writes: > >> So how about this: > >> > >> (1) Add a vendor specific pci capability for new-style virtio. > >> Specifies the pci bar used for new-style virtio registers. > >> Guest

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Anthony Liguori
Rusty Russell writes: > Gerd Hoffmann writes: >> So how about this: >> >> (1) Add a vendor specific pci capability for new-style virtio. >> Specifies the pci bar used for new-style virtio registers. >> Guests can use it to figure whenever new-style virtio is >> supported and to map t

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Michael S. Tsirkin
On Wed, Oct 10, 2012 at 02:14:11PM +1030, Rusty Russell wrote: > > See above. A guest could happily just use BAR1/BAR2 and completely > > ignore BAR0 provided that BAR1/BAR2 are present. > > But x86 guests want BAR0 because IO space is faster than MMIO. Right? Or to be a bit more precise, ATM o

Re: Proposal for virtio standardization.

2012-10-10 Thread Rusty Russell
Cornelia Huck writes: > On Thu, 27 Sep 2012 09:59:33 +0930 > Rusty Russell wrote: >> 3) Various clarifications, formalizations and cleanups to the spec text, >>and possibly elimination of old deprecated features. >> >> 4) The only significant change to the spec is that we use PCI >>capab

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
Gerd Hoffmann writes: > So how about this: > > (1) Add a vendor specific pci capability for new-style virtio. > Specifies the pci bar used for new-style virtio registers. > Guests can use it to figure whenever new-style virtio is > supported and to map the correct bar (which will proba

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
Anthony Liguori writes: > Rusty Russell writes: > >> Anthony Liguori writes: >>> We'll never remove legacy so we shouldn't plan on it. There are >>> literally hundreds of thousands of VMs out there with the current virtio >>> drivers installed in them. We'll be supporting them for a very, very

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Rusty Russell
Jamie Lokier writes: > Rusty Russell wrote: >> I don't think it'll be that bad; reset clears the device to unknown, >> bar0 moves it from unknown->legacy mode, bar1/2/3 changes it from >> unknown->modern mode, and anything else is bad (I prefer being strict so >> we catch bad implementations from

Re: [Qemu-devel] Using PCI config space to indicate config location

2012-10-10 Thread Michael S. Tsirkin
On Tue, Oct 09, 2012 at 10:26:12AM +1030, Rusty Russell wrote: > Anthony Liguori writes: > > Gerd Hoffmann writes: > > > >> Hi, > >> > So we could have for virtio something like this: > > Capabilities: [??] virtio-regs: > legacy: BAR=0 offset=0 >

Re: Using PCI config space to indicate config location

2012-10-10 Thread Michael S. Tsirkin
On Mon, Oct 08, 2012 at 12:51:25PM +1030, Rusty Russell wrote: > (Topic updated, cc's trimmed). > > Anthony Liguori writes: > > Rusty Russell writes: > >> 4) The only significant change to the spec is that we use PCI > >>capabilities, so we can have infinite feature bits. > >>(see > >>

[PATCH] vhost-blk: Add vhost-blk support v3

2012-10-10 Thread Asias He
vhost-blk is an in-kernel virito-blk device accelerator. Due to lack of proper in-kernel AIO interface, this version converts guest's I/O request to bio and use submit_bio() to submit I/O directly. So this version any supports raw block device as guest's disk image, e.g. /dev/sda, /dev/ram0. We ca