Re: [PATCHv4 1/6] qemu/virtio: move features to an inline function

2009-11-02 Thread Avi Kivity
On 11/03/2009 12:33 AM, Anthony Liguori wrote: > Michael S. Tsirkin wrote: >> devices should have the final say over which virtio features they >> support. E.g. indirect entries may or may not make sense in the context >> of virtio-console. In particular, for vhost, we do not want to report to >> g

Re: [PATCHv6 3/3] vhost_net: a kernel-level virtio server

2009-11-02 Thread Daniel Walker
Random style issues below .. Part of this is just stuff checkpatch found. On Tue, 2009-11-03 at 00:29 +0200, Michael S. Tsirkin wrote: > +static int move_iovec_hdr(struct iovec *from, struct iovec *to, > + size_t len, int iov_count) > +{ > + int seg = 0; > + siz

Re: [PATCHv4 0/6] qemu-kvm: vhost net support

2009-11-02 Thread Anthony Liguori
Hi Michael, I'll reserve individual patch review until they're in a mergable state, but I do have some comments about the overall integration architecture. Generally speaking, I think the integration unnecessarily invasive. It adds things to the virtio infrastructure that shouldn't be there li

Re: [PATCHv4 1/6] qemu/virtio: move features to an inline function

2009-11-02 Thread Anthony Liguori
Michael S. Tsirkin wrote: > devices should have the final say over which virtio features they > support. E.g. indirect entries may or may not make sense in the context > of virtio-console. In particular, for vhost, we do not want to report to > guest bits not supported by kernel backend. Move the

[PATCHv6 3/3] vhost_net: a kernel-level virtio server

2009-11-02 Thread Michael S. Tsirkin
What it is: vhost net is a character device that can be used to reduce the number of system calls involved in virtio networking. Existing virtio net code is used in the guest without modification. There's similarity with vringfd, with some differences and reduced scope - uses eventfd for signallin

[PATCHv6 1/3] tun: export underlying socket

2009-11-02 Thread Michael S. Tsirkin
Tun device looks similar to a packet socket in that both pass complete frames from/to userspace. This patch fills in enough fields in the socket underlying tun driver to support sendmsg/recvmsg operations, and message flags MSG_TRUNC and MSG_DONTWAIT, and exports access to this socket to modules.

[PATCHv6 2/3] mm: export use_mm/unuse_mm to modules

2009-11-02 Thread Michael S. Tsirkin
vhost net module wants to do copy to/from user from a kernel thread, which needs use_mm. Export it to modules. Acked-by: Andrea Arcangeli Signed-off-by: Michael S. Tsirkin --- mm/mmu_context.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/mm/mmu_context.c b/mm/mmu_c

[PATCHv4 3/6] qemu/net: add raw backend

2009-11-02 Thread Or Gerlitz
Add raw network backend option which uses a packet socket to provide raw networking access. Once the socket is opened it's bound to a provided host interface, such that packets received on the interface are delivered to the VM and packets sent by the VM are sent to the interface. This is functiona

[PATCHv6 0/3] vhost: a kernel-level virtio server

2009-11-02 Thread Michael S. Tsirkin
Rusty, ok, I think I've addressed your comments so far here. In particular I have added write logging for live migration, indirect buffers and virtio net header (enables gso). I'd like this to go into linux-next, through your tree, and hopefully 2.6.33. What do you think? --- This implements vh

[PATCHv4 6/6] qemu-kvm: vhost-net implementation

2009-11-02 Thread Michael S. Tsirkin
This adds support for vhost-net virtio kernel backend. This patch is not intended to being merged yet. I'm posting it for the benefit of people testing the backend. Usage instructions: vhost currently requires MSI-X support in guest virtio. This means guests kernel version should be >= 2.6.31. T

[PATCHv4 5/6] qemu/raw: add API to get raw socket

2009-11-02 Thread Michael S. Tsirkin
Add API to get raw socket from vlanclient, so that we can connect it to frontend such as vhost. Signed-off-by: Michael S. Tsirkin --- net.c |8 net.h |2 ++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index 1fb2f2f..9168460 100644 --- a/net.c ++

[PATCHv4 4/6] qemu/net: move typedef to qemu-common.h

2009-11-02 Thread Michael S. Tsirkin
Move typedef VLANClientState to qemu-common.h so that users can use forward-declared type without pulling in net.h Signed-off-by: Michael S. Tsirkin --- net.h |2 -- qemu-common.h |1 + 2 files changed, 1 insertions(+), 2 deletions(-) diff --git a/net.h b/net.h index 7246d16..00

[PATCHv4 2/6] qemu/net: routines to get tap fd

2009-11-02 Thread Michael S. Tsirkin
vhost need tap fd, add API to get it from vlan client Signed-off-by: Michael S. Tsirkin --- net.c | 10 ++ net.h |1 + 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/net.c b/net.c index 6a7f1c2..8ac639b 100644 --- a/net.c +++ b/net.c @@ -1472,6 +1472,16 @@ static i

[PATCHv4 1/6] qemu/virtio: move features to an inline function

2009-11-02 Thread Michael S. Tsirkin
devices should have the final say over which virtio features they support. E.g. indirect entries may or may not make sense in the context of virtio-console. In particular, for vhost, we do not want to report to guest bits not supported by kernel backend. Move the common bits from virtio-pci to an

[PATCHv4 0/6] qemu-kvm: vhost net support

2009-11-02 Thread Michael S. Tsirkin
This adds support for vhost-net virtio kernel backend. This is not intented for merge. See vhost net patch description for details. This applies on top of commit 47e465f031fc43c53ea8f08fa55cc3482c6435c8 in Avi's tree. It won't apply to tree tip. TODO: rebase. The patchset also includes raw soc