Re: [PATCH RFC 1/5] vringfd syscall

2008-04-12 Thread Marcelo Tosatti
On Sat, Apr 12, 2008 at 02:18:20PM -0300, Marcelo Tosatti wrote: + mask = POLLIN | POLLRDNORM; + else + mask = 0; + +poll_wait: + poll_wait(filp, vr-poll_wait, poll); + + return mask; +} I suppose you are doing data copy in -poll instead of -read to

Re: [PATCH RFC 1/5] vringfd syscall

2008-04-08 Thread Jonathan Corbet
Hey, Rusty, For virtualization, we've developed virtio_ring for efficient communication. This would also work well for userspace-kernel communication, particularly for things like the tun device. By using the same ABI, we can join guests to the host kernel trivially. I'm *sure* you meant to

Re: [PATCH RFC 1/5] vringfd syscall

2008-04-07 Thread Rusty Russell
On Tuesday 08 April 2008 03:54:34 Jonathan Corbet wrote: Hey, Rusty, For virtualization, we've developed virtio_ring for efficient communication. This would also work well for userspace-kernel communication, particularly for things like the tun device. By using the same ABI, we can join

Re: [PATCH RFC 1/5] vringfd syscall

2008-04-07 Thread Arnd Bergmann
On Saturday 05 April 2008, Rusty Russell wrote: +asmlinkage long sys_vringfd(void __user *addr, +       unsigned num_descs, +       u16 __user *last_used) +{ +   int fd, err; +   struct file *filp; +   struct vring_info *vr; + +   /*

Re: [PATCH RFC 1/5] vringfd syscall

2008-04-05 Thread Anthony Liguori
Rusty Russell wrote: For virtualization, we've developed virtio_ring for efficient communication. This would also work well for userspace-kernel communication, particularly for things like the tun device. By using the same ABI, we can join guests to the host kernel trivially. These patches

Re: [PATCH RFC 1/5] vringfd syscall

2008-04-05 Thread Rusty Russell
On Sunday 06 April 2008 03:13:41 Anthony Liguori wrote: + void *buf = calloc(vring_size(256, getpagesize()), 0); Shouldn't this be calloc(1, vring_size(256, getpagesize()));? Heh, yes... spot the last minute change from malloc to calloc. + if (r != 0) + err(1, poll after