All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: gkurz@linux.vnet.ibm.com
Cc: netdev@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	mst@redhat.com
Subject: Re: [PATCH] vhost: move is_le setup to the backend
Date: Mon, 02 Nov 2015 15:09:22 -0500 (EST)	[thread overview]
Message-ID: <20151102.150922.1956383631313633658.davem__19850.2566120171$1446494989$gmane$org@davemloft.net> (raw)
In-Reply-To: <20151030114235.28847.63465.stgit@bahia.huguette.org>

From: Greg Kurz <gkurz@linux.vnet.ibm.com>
Date: Fri, 30 Oct 2015 12:42:35 +0100

> 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 support and device is legacy virtio with a different
>    endianness than the host
> 
> Both cases rely on the VHOST_SET_FEATURES ioctl, but 2) also needs the
> VHOST_SET_VRING_ENDIAN ioctl to be called by userspace. Since vq->is_le
> is only needed when the backend is active, it was decided to set it at
> backend start.
> 
> This is currently done in vhost_init_used()->vhost_init_is_le() but it
> obfuscates the core vhost code. This patch moves the is_le setup to a
> dedicated function that is called from the backend code.
> 
> Note vhost_net is the only backend that can pass vq->private_data == NULL to
> vhost_init_used(), hence the "if (sock)" branch.
> 
> No behaviour change.
> 
> Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>

Michael, I'm assuming that you will be the one taking this.

  parent reply	other threads:[~2015-11-02 20:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 11:42 [PATCH] vhost: move is_le setup to the backend Greg Kurz
2015-11-02 20:09 ` David Miller
2015-11-02 20:09 ` David Miller [this message]
2015-11-12  8:30 ` Greg Kurz
2015-11-12 12:37 ` Cornelia Huck
2015-11-12 12:37   ` Cornelia Huck
2015-11-12 13:46 ` Michael S. Tsirkin
2015-11-12 14:28   ` Greg Kurz
2015-12-16 13:52     ` Greg Kurz
2015-11-12 13:46 ` Michael S. Tsirkin
2016-01-11 14:39 Greg Kurz
2016-01-12 10:01 ` Michael S. Tsirkin
2016-01-12 10:31   ` Greg Kurz
2016-01-12 10:48     ` Michael S. Tsirkin
2016-01-12 10:48     ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='20151102.150922.1956383631313633658.davem__19850.2566120171$1446494989$gmane$org@davemloft.net' \
    --to=davem@davemloft.net \
    --cc=gkurz@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.