Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-17 Thread Stefan Hajnoczi
On Fri, Jul 17, 2015 at 09:30:03AM +0300, Catalin Vasile wrote: > Do you mean vhost_net - old kernel, qemu - latest, guest - latest? I mean whatever combination didn't work for your custom vhost module. If vhost_net is broken too there is probably a vhost/QEMU bug that should be fixed. Stefan p

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-16 Thread Catalin Vasile
Do you mean vhost_net - old kernel, qemu - latest, guest - latest? On Thu, Jul 16, 2015 at 7:33 PM, Stefan Hajnoczi wrote: > On Thu, Jul 16, 2015 at 1:54 PM, Catalin Vasile > wrote: >> Both. The compiled kernel was common for both. > > Does vhost_net work with the old kernel + new QEMU combo? >

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-16 Thread Stefan Hajnoczi
On Thu, Jul 16, 2015 at 1:54 PM, Catalin Vasile wrote: > Both. The compiled kernel was common for both. Does vhost_net work with the old kernel + new QEMU combo? Stefan

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-16 Thread Catalin Vasile
Both. The compiled kernel was common for both. On Thu, Jul 16, 2015 at 3:52 PM, Stefan Hajnoczi wrote: > On Thu, Jul 09, 2015 at 01:45:50PM +0300, Catalin Vasile wrote: >> I have managed to deal with it. >> The thing is I was using one of the latest versions of qemu, but an >> old Linux Kernel ve

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-16 Thread Stefan Hajnoczi
On Thu, Jul 09, 2015 at 01:45:50PM +0300, Catalin Vasile wrote: > I have managed to deal with it. > The thing is I was using one of the latest versions of qemu, but an > old Linux Kernel version of 3.12. Old guest kernel or old host kernel? New QEMU should support old guest kernels. Maybe you ha

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-09 Thread Catalin Vasile
I have managed to deal with it. The thing is I was using one of the latest versions of qemu, but an old Linux Kernel version of 3.12. On Thu, Jul 9, 2015 at 1:43 PM, Stefan Hajnoczi wrote: > On Tue, Jul 07, 2015 at 02:43:06PM +0300, Catalin Vasile wrote: >> My vhost module respects the format vho

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-09 Thread Stefan Hajnoczi
On Tue, Jul 07, 2015 at 02:43:06PM +0300, Catalin Vasile wrote: > My vhost module respects the format vhost-net uses: > > /* summary */ > mutex_lock(&vq->mutex); > vhost_disable_notify(); > for (;;) { > head = vhost_get_vq_desc(); >if (head == vq->num) { > if (unlikely

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-07 Thread Catalin Vasile
My vhost module respects the format vhost-net uses: /* summary */ mutex_lock(&vq->mutex); vhost_disable_notify(); for (;;) { head = vhost_get_vq_desc(); if (head == vq->num) { if (unlikely(vhost_enable_notify())) { vhost_disable_notify();

Re: [Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-07 Thread Stefan Hajnoczi
On Mon, Jul 06, 2015 at 06:13:29PM +0300, Catalin Vasile wrote: > What is the logic behind vring_need_event() when used with > virtqueue_kick_prepare()? > What does the keyword >>just<< refer to from the following context: > /* The following is used with USED_EVENT_IDX and AVAIL_EVENT_IDX */ > /* A

[Qemu-devel] [virtio guest] vring_need_event() from virtqueue_kick_prepare()

2015-07-06 Thread Catalin Vasile
What is the logic behind vring_need_event() when used with virtqueue_kick_prepare()? What does the keyword >>just<< refer to from the following context: /* The following is used with USED_EVENT_IDX and AVAIL_EVENT_IDX */ /* Assuming a given event_idx value from the other size, if * we have just in