Re: [GIT PULL net-next-2.6] vhost-net patchset for 2.6.37
From: "Michael S. Tsirkin" Date: Tue, 5 Oct 2010 20:27:32 +0200 > It looks like it was a quiet cycle for vhost-net: > probably because most of energy was spent on bugfixes > that went in for 2.6.36. > People are working on multiqueue, tracing but I'm not > sure it'll get done in time for 2.6.37 - so here's > a tree with a single patch that helps windows guests > which we definitely want in the next kernel. > > Please merge for 2.6.37. Pulled, thanks Michael. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
[PATCH] x86/xen: remove duplicated include
Remove duplicated include. Signed-off-by: Nicolas Kaiser --- arch/x86/xen/enlighten.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 7d46c84..3396891 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -58,7 +58,6 @@ #include #include #include -#include #include #include -- 1.7.2.2 ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
Re: [PATCH 1/1] staging: hv: Remove camel case variables in channel.c
On Thu, 30 Sep 2010 05:12:10 -0700 Greg KH wrote: > On Wed, Sep 29, 2010 at 09:21:50PM -0700, Hank Janssen wrote: > > > > Rename camel case variables in channel.c and changed them to > > lowercase. > > > > Sending this from my own accounts till we have a proper mail server > > set up that allows us to send out patches without issues. > > This paragraph goes below the '---' line, it doesn't belong in the > change log, right? I recently read something about 'scissor lines' which allow more natural reading flow with patches by git automatically skipping everything above a scissor-line: 'A line that mainly consists of scissors (either ">8" or "8<") and perforation (dash "-") marks is called a scissors line' man git-mailinfo git-am -c :-) Cheers, Flo ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
Re: vhost_net_ioctl
On Wed, Oct 6, 2010 at 12:34 PM, devi thapa wrote: > I am actually going only through net.c and in this module they > haven't specified anywhere, where this value is coming from. In order to understand net.c it will be necessary to read other code too. Make sure you have an environment that makes it easy to jump to function and variable definitions and switch between source files. For example, use ctags, cscope, or even Eclipse to navigate the kernel source tree. > So, you mean that kernel vhost code is connected to QEMU userspace code. QEMU userspace makes use of the vhost interface. If you get stuck understanding the kernel side, you can jump to the relevant place in QEMU and see what userspace is doing. This will be useful especially for the part of the code that sets up a vhost-net device. > I request to guide me in following the code. In order to understand the code, you need to put in the effort to dig through the source for yourself. The strategy I follow is to read the code (you've already started with the kernel vhost-net code). Much of it will be unclear on the first pass. Now switch to QEMU and read the vhost code there. Patterns will become clearer but there will still be unanswered questions. Go back to the kernel and study it again with the insight you've gained from the userspace side. Iterate a few times. That's how I understand new systems. Some other ideas to try if you get stuck: 1. Check the virtio specification for details on vring and the virtio-net device: http://ozlabs.org/~rusty/virtio-spec/virtio-spec-0.8.9.pdf 2. Use strace to see how QEMU uses the vhost file descriptor. 3. Look at related code like the virtio-net guest driver, the tap driver, KVM's ioeventfd and irqfd. Good luck! Stefan ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
Re: [RFC PATCH] virtio: (Partially) enable suspend/resume support
On (Tue) Oct 05 2010 [17:23:19], Michael S. Tsirkin wrote: > On Tue, Oct 05, 2010 at 07:15:31PM +0530, Amit Shah wrote: > > > > + > > > > + spin_lock_irqsave(&vp_dev->lock, flags); > > > > + list_for_each_entry(info, &vp_dev->virtqueues, node) { > > > > + /* Select the queue we're interested in */ > > > > + iowrite16(info->queue_index, > > > > + vp_dev->ioaddr + VIRTIO_PCI_QUEUE_SEL); > > > > + > > > > + /* Update the last idx we sent data in */ > > > > + iowrite16(virtqueue_get_avail_idx(info->vq), > > > > + vp_dev->ioaddr + VIRTIO_PCI_AVAIL_IDX); > > > > > > Interesting. Could we just reset the ring instead? > > > I think this would also solve the qemu problem you > > > outline, won't it? > > > > The problem here is qemu doesn't "know" we went into suspend and came > > out of it. When going to suspend, qemu could've received a kick > > notification and would've been just about to process some queue entries. > > Now when we resume and reset the ring, qemu could crash anyway seeing > > invalid index values. > > Hmm, I don't completely understand this. When there's a reset I expect > this to discard any previous kicks. No? I'm talking of a situation like this: Guest Host virtqueue_add_buf() virtqueue_kick() virtqueue_pop() (in progress) --> suspend Now there will be some buffers in the virtqueue but the host wouldn't know on the next resume. So we want to keep the ring state in the current state so that the host continues consuming from where it left off. Now this wouldn't crash on resume for virtio-net, but for virtio-serial (which uses chardevs) and also for virtio-block, I guess there are more problems. For example, for virtio-serial, if the machine is re-started with a chardev connected, the virtqueue_num_heads() function gets called, which results in the 'Guest moved used index' message. Amit ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
Re: vhost_net_ioctl
The arg value is being used to get the fd of the backend, in my case, I prefer tap as a backend device. And the same arg value is being used to get the features of backend device. I am actually going only through net.c and in this module they haven't specified anywhere, where this value is coming from. So, you mean that kernel vhost code is connected to QEMU userspace code. I request to guide me in following the code. With hope, Devi. On 10/6/10, Stefan Hajnoczi wrote: > On Wed, Oct 6, 2010 at 11:16 AM, devi thapa wrote: >> What's the role or value of the third argument in the >> vhost_net_ioctl function in /drivers/vhost/net.c . > > Read the code. There is the kernel vhost code and the QEMU vhost > userspace code to look at. By studying both sides you can figure this > out. > > Look at how arg is used in vhost_net_ioctl(). > > Please spend more time learning how things work before sending > questions to the mailing list. > > Stefan > ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
Re: vhost_net_ioctl
On Wed, Oct 6, 2010 at 11:16 AM, devi thapa wrote: > What's the role or value of the third argument in the > vhost_net_ioctl function in /drivers/vhost/net.c . Read the code. There is the kernel vhost code and the QEMU vhost userspace code to look at. By studying both sides you can figure this out. Look at how arg is used in vhost_net_ioctl(). Please spend more time learning how things work before sending questions to the mailing list. Stefan ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
vhost_net_ioctl
Hi All, What's the role or value of the third argument in the vhost_net_ioctl function in /drivers/vhost/net.c . The function declaration is static long vhost_net_ioctl(struct file *f, unsigned int ioctl, unsigned long arg) As per my knowledge, *f represents the fd of vhost-net device, ioctl any device request like VHOST_NET_SET_BACKEND, But what's the third arg represent ? With hope, Devi. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
Re: [PATCH] virtio-spec trivial fixes
On Wed, 6 Oct 2010 12:20:01 am Amit Shah wrote: > Hello Rusty, > > A few trivial fixes on top of virtio-spec-0.8.9 (patch -p0): Thanks, applied. If you turn on lyx change tracking, patches get uglier but it means annotations of differences show up in next version. Thanks! Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization
Re: VHOST_NET_SET_BACKEND
On Wed, Oct 6, 2010 at 7:43 AM, devi thapa wrote: > I dont know how to put this question, but bear with me. My > query is how to invoke the ioctl request "VHOST_NET_SET_BACKEND" or > how to set the backend, and when ? Look at the QEMU side vhost-net code: http://git.qemu.org/qemu.git/tree/hw/vhost_net.c#n145 Where does the backend fd come from? It's the host network device file descriptor that gets fetched by vhost_net_get_fd(). Currently it must be a tap device file descriptor. Stefan ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linux-foundation.org/mailman/listinfo/virtualization