Re: [PATCH] vhost: move is_le setup to the backend

2015-11-12 Thread Greg Kurz
On Fri, 30 Oct 2015 12:42:35 +0100 Greg Kurz wrote: > The vq->is_le field is used to fix endianness when accessing the vring via > the cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases: > > 1) host is big endian and device is modern virtio > > 2)

[PATCH] VMCI: Use 32bit atomics for queue headers on X86_32

2015-11-12 Thread Jorgen Hansen
This change restricts the reading and setting of the head and tail pointers on 32bit X86 to 32bit for both correctness and performance reasons. On uniprocessor X86_32, the atomic64_read may be implemented as a non-locked cmpxchg8b. This may result in updates to the pointers done by the VMCI device

[PATCH net-next RFC V3 0/3] basic busy polling support for vhost_net

2015-11-12 Thread Jason Wang
Hi all: This series tries to add basic busy polling for vhost net. The idea is simple: at the end of tx/rx processing, busy polling for new tx added descriptor and rx receive socket for a while. The maximum number of time (in us) could be spent on busy polling was specified ioctl. Test were done

[PATCH net-next RFC V3 1/3] vhost: introduce vhost_has_work()

2015-11-12 Thread Jason Wang
This path introduces a helper which can give a hint for whether or not there's a work queued in the work list. Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 7 +++ drivers/vhost/vhost.h | 1 + 2 files changed, 8 insertions(+) diff --git a/drivers/vhost/vhost.c

[PATCH net-next RFC V3 2/3] vhost: introduce vhost_vq_more_avail()

2015-11-12 Thread Jason Wang
Signed-off-by: Jason Wang --- drivers/vhost/vhost.c | 26 +- drivers/vhost/vhost.h | 1 + 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 163b365..b86c5aa 100644 ---

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-12 Thread David Woodhouse
On Thu, 2015-11-12 at 13:09 +0200, Michael S. Tsirkin wrote: > On Wed, Nov 11, 2015 at 11:30:27PM +0100, David Woodhouse wrote: > > > > If the IOMMU is exposed, and enabled, and telling the guest kernel that > > it *does* cover the virtio devices, then those virtio devices will > > *not* be in

Re: [PATCH net-next RFC V3 0/3] basic busy polling support for vhost_net

2015-11-12 Thread Jason Wang
On 11/12/2015 06:16 PM, Jason Wang wrote: > Hi all: > > This series tries to add basic busy polling for vhost net. The idea is > simple: at the end of tx/rx processing, busy polling for new tx added > descriptor and rx receive socket for a while. The maximum number of > time (in us) could be

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-12 Thread Michael S. Tsirkin
On Wed, Nov 11, 2015 at 11:30:27PM +0100, David Woodhouse wrote: > On Wed, 2015-11-11 at 07:56 -0800, Andy Lutomirski wrote: > > > > Can you flesh out this trick? > > > > On x86 IIUC the IOMMU more-or-less defaults to passthrough. If the > > kernel wants, it can switch it to a non-passthrough

Re: [PATCH] vhost: move is_le setup to the backend

2015-11-12 Thread Cornelia Huck
On Fri, 30 Oct 2015 12:42:35 +0100 Greg Kurz wrote: > The vq->is_le field is used to fix endianness when accessing the vring via > the cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases: > > 1) host is big endian and device is modern virtio > > 2)

Re: [PATCH] vhost: move is_le setup to the backend

2015-11-12 Thread Michael S. Tsirkin
On Fri, Oct 30, 2015 at 12:42:35PM +0100, Greg Kurz wrote: > The vq->is_le field is used to fix endianness when accessing the vring via > the cpu_to_vhost16() and vhost16_to_cpu() helpers in the following cases: > > 1) host is big endian and device is modern virtio > > 2) host has cross-endian