Re: [kvm-devel] [PATCH 1/1] QEMU/KVM: Support for PCI Passthrough

2008-04-17 Thread Amit Shah
* On Monday 14 Apr 2008 06:01:07 Samuel Masham wrote: > On Sun, Apr 13, 2008 at 9:49 PM, Dor Laor <[EMAIL PROTECTED]> wrote: > > On Thu, 2008-04-10 at 11:48 +0300, Amit Shah wrote: > > > If kvm uses the in-kernel irqchip, interrupts are routed to > > > the guest via the kvm module (accompanied k

[PATCH 4/5] tun: vringfd receive support.

2008-04-17 Thread Rusty Russell
This patch modifies tun to allow a vringfd to specify the receive buffer. Because we can't copy to userspace in bh context, we queue like normal then use the "pull" hook to actually do the copy. We use struct virtio_net_hdr prepended to packets in the ring to allow userspace to receive GSO packet

[PATCH 5/5] tun: vringfd xmit support.

2008-04-17 Thread Rusty Russell
This patch modifies tun to allow a vringfd to specify the send buffer. The user does a write to push out packets from the buffer. Again we use the 'struct virtio_net_hdr' to allow userspace to send GSO packets. In this case, it can hint how much to copy, and the other pages will be made into skb

[PATCH 3/5] /dev/vring limit and base ioctls

2008-04-17 Thread Rusty Russell
It turns out the lguest (and possibly kvm) want the addresses in the ring buffer to only cover a certain part of memory, and be offset. It makes sense that this be an ioctl. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- Documentation/ioctl-number.txt |3 +-- drivers/char/vring.c

[PATCH 1/5] virtio: put last_used and last_avail index into ring itself.

2008-04-17 Thread Rusty Russell
Generally, the other end of the virtio ring doesn't need to see where you're up to in consuming the ring. However, in order for an external entity to understand it, it must be exposed. For example, if you want to save and restore a virtio_ring, but you're not the consumer because the kernel is us

[PATCH 2/5] /dev/vring: simple userspace-kernel ringbuffer interface.

2008-04-17 Thread Rusty Russell
virtio introduced a ring structure ABI for guest-host communications (currently used by lguest and kvm). Using this same ABI, we can create a nice fd version. This is useful for efficiently passing packets to and from the tun, for example. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- dr

[PATCH 0/5] High-speed tun receive and xmit

2008-04-17 Thread Rusty Russell
kvm (and lguest!) want to get more speed out of the tun device. We already have an ABI for guest<->host comms, called virtio_ring; extending tun to understand this (with its async nature and batching) make for an efficient network. But moreover: the same things that make virtio a good guest<->

virtio: wean net driver off NETDEV_TX_BUSY

2008-04-17 Thread Rusty Russell
Herbert tells me that returning NETDEV_TX_BUSY from hard_start_xmit is seen as a poor thing to do; we should cache the packet and stop the queue. Signed-off-by: Rusty Russell <[EMAIL PROTECTED]> --- drivers/net/virtio_net.c | 57 +++ 1 file changed, 3

[6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-17 Thread Herbert Xu
Finally this patch lets virtio_net receive GSO packets in addition to sending them. This can definitely be optimised for the non-GSO case. For comparison the Xen approach stores one page in each skb and uses subsequent skb's pages to construct an SG skb instead of preallocating the maximum amount

[5/6] [VIRTIO] net: Add ethtool ops for SG/GSO

2008-04-17 Thread Herbert Xu
This patch adds some basic ethtool operations to virtio_net so I could test SG without GSO (which was really useful because TSO turned out to be buggy :) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index b58472c..0b508bb 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/

[4/6] [KVM] virtio-net: Add SG/GSO support

2008-04-17 Thread Herbert Xu
Here's the patch to get the KVM backend to do GSO. Please note that this was a quick hack and I haven't even tested the case where the tun device doesn't support GSO so it'll probably break there. It does the stupidest thing possible for guest => host by copying the data so that it can use write(

[3/6] [TUN]: Fix GSO mapping

2008-04-17 Thread Herbert Xu
This patch avoids the correctness issue on the user-space mapping by just copying the memory. diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 4c15dc4..d75cfd2 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -62,6 +62,7 @@ #include #include #include +#include #include #

[2/6] [TUN]: Add GSO detection

2008-04-17 Thread Herbert Xu
This is Rusty's second patch to tun to allow user-space access to the GSO feature in a backwards compatible way. diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 34a03ec..4c15dc4 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -800,6 +800,15 @@ static int tun_chr_ioctl(struct ino

[1/6] [TUN]: Add GSO support

2008-04-17 Thread Herbert Xu
This is Rusty's GSO patch for the tun device driver. Please see his posting for the changelog. diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 7b816a0..34a03ec 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -62,6 +62,7 @@ #include #include #include +#include #include

[0/6] [NET]: virtio SG/TSO patches

2008-04-17 Thread Herbert Xu
Hi: Here are the patches I used for testing KVM with virtio-net using TSO. There are three patches for the tun device which are basically Rusty's patches with the mmap turned into copying (for correctness). Two patches are for the virtio-net frontend, one required to support receiving SG/TSO, and

Re: [PATCH] add virtio disk geometry feature

2008-04-17 Thread Ryan Harper
* Anthony Liguori <[EMAIL PROTECTED]> [2008-04-16 16:33]: > Rusty Russell wrote: > >On Thursday 17 April 2008 04:56:37 Ryan Harper wrote: > > > >>From: Ryan Harper <[EMAIL PROTECTED]> > >> > >>Rather than faking up some geometry, allow the backend to push the disk > >>geometry via virtio pci conf

[Reminder] Call for Presentations: KVM Forum 2008

2008-04-17 Thread Avi Kivity
[Note: KVM Forum registration is now open at http://kforum.qumranet.com/KVMForum/about_kvmforum.php] This is the Call for Presentations for the second annual KVM Developer's Forum, to be held on June 10-13, 2008, in Napa, California, USA [1]. We are looking for presentations on KVM development, q