Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1175855

Re: [PULL] virtio/vhost: cross endian support

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Greg Kurz <gkurz@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PULL] virtio/vhost: cross endian support
Date Thu, 02 Jul 2015 11:20:03 +0200
Message-ID <pHIP1-Na-21@gated-at.bofh.it> (permalink)
References <pHmEN-3rt-7@gated-at.bofh.it> <pHvyp-Fn-15@gated-at.bofh.it> <pHFR7-7su-3@gated-at.bofh.it>
X-Original-To "Michael S. Tsirkin" <mst@redhat.com>
X-Helo d06dlp02.portsmouth.uk.ibm.com
X-Mailfrom gkurz@linux.vnet.ibm.com
X-Rcptto netdev@vger.kernel.org
Organization IBM
X-Mailer Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-redhat-linux-gnu)
MIME-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-Tm-As-Mml disable
X-Content-Scanned Fidelis XPS MAILER
X-Cbid 15070209-0013-0000-0000-0000048F0B15
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 53
X-Original-Cc Linus Torvalds <torvalds@linux-foundation.org>, KVM list <kvm@vger.kernel.org>, virtualization <virtualization@lists.linux-foundation.org>, Network Development <netdev@vger.kernel.org>, Linux Kernel Mailing List <linux-kernel@vger.kernel.org>, Cornelia Huck <cornelia.huck@de.ibm.com>, kraxel@redhat.com
X-Original-Date Thu, 2 Jul 2015 11:12:56 +0200
X-Original-Message-ID <20150702111256.13f8ea71@bahia.local>
X-Original-References <20150701113150-mutt-send-email-mst@redhat.com> <CA+55aFwE+vO2xevQ5jpyC0uJ7gASDwMS4=aDb=78RsJNA-wN1Q@mail.gmail.com> <20150702071412-mutt-send-email-mst@redhat.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1175855

Show key headers only | View raw


On Thu, 2 Jul 2015 08:01:28 +0200
"Michael S. Tsirkin" <mst@redhat.com> wrote:

> On Wed, Jul 01, 2015 at 12:02:50PM -0700, Linus Torvalds wrote:
> > On Wed, Jul 1, 2015 at 2:31 AM, Michael S. Tsirkin <mst@redhat.com> wrote:
> > > virtio/vhost: cross endian support
> > 
> > Ugh. Does this really have to be dynamic?
> > 
> > Can't virtio do the sane thing, and just use a _fixed_ endianness?
> > 
> > Doing a unconditional byte swap is faster and simpler than the crazy
> > conditionals. That's true regardless of endianness, but gets to be
> > even more so if the fixed endianness is little-endian, since BE is
> > not-so-slowly fading from the world.
> > 
> >                Linus
> 
> Yea, well - support for legacy BE guests on the new LE hosts is
> exactly the motivation for this.
> 
> I dislike it too, but there are two redeeming properties that
> made me merge this:
> 
> 1.  It's a trivial amount of code: since we wrap host/guest accesses
>     anyway, almost all of it is well hidden from drivers.
> 
> 2.  Sane platforms would never set flags like VHOST_CROSS_ENDIAN_LEGACY -
>     and when it's clear, there's zero overhead (as some point it was
>     tested by compiling with and without the patches, got the same
>     stripped binary).
> 
> Maybe we could create a Kconfig symbol to enforce point (2): prevent
> people from enabling it e.g. on x86. I will look into this - but it can
> be done by a patch on top, so I think this can be merged as is.
> 

This cross-endian *oddity* is targeting PowerPC book3s_64 processors... I
am not aware of any other users. Maybe create a symbol that would
be only selected by PPC_BOOK3S_64 ?


> Or do you know of someone using kernel with all config options enabled
> undiscriminately?
> 
> Thanks,
> 

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PULL] virtio/vhost: cross endian support Greg Kurz <gkurz@linux.vnet.ibm.com> - 2015-07-02 11:20 +0200
  Re: [PULL] virtio/vhost: cross endian support "Michael S. Tsirkin" <mst@redhat.com> - 2015-07-02 11:40 +0200
    Re: [PULL] virtio/vhost: cross endian support Thomas Huth <thuth@redhat.com> - 2015-07-07 18:40 +0200
      Re: [PULL] virtio/vhost: cross endian support "Michael S. Tsirkin" <mst@redhat.com> - 2015-07-07 19:00 +0200

csiph-web