virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: Greg Kurz <gkurz@linux.vnet.ibm.com>
Cc: KVM list <kvm@vger.kernel.org>,
	Network Development <netdev@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	virtualization <virtualization@lists.linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PULL] virtio/vhost: cross endian support
Date: Thu, 2 Jul 2015 11:32:52 +0200	[thread overview]
Message-ID: <20150702112809-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <20150702111256.13f8ea71@bahia.local>

On Thu, Jul 02, 2015 at 11:12:56AM +0200, Greg Kurz wrote:
> 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 ?

I think some ARM systems are trying to support cross-endian
configurations as well.

Besides that, yes, this is more or less what I had in mind.

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

  reply	other threads:[~2015-07-02  9:32 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20150701113150-mutt-send-email-mst@redhat.com>
2015-07-01 19:02 ` [PULL] virtio/vhost: cross endian support Linus Torvalds
2015-07-01 19:03   ` Linus Torvalds
2015-07-02  6:12     ` Michael S. Tsirkin
2015-07-02  6:01   ` Michael S. Tsirkin
2015-07-02  9:12     ` Greg Kurz
2015-07-02  9:32       ` Michael S. Tsirkin [this message]
2015-07-07 16:36         ` Thomas Huth
     [not found]         ` <20150707183653.462b5df0@thh440s>
2015-07-07 16:51           ` Michael S. Tsirkin
2015-07-09  7:49             ` [PATCH] KVM: Add Kconfig option to signal cross-endian guests Thomas Huth
     [not found]             ` <1436428145-29823-1-git-send-email-thuth@redhat.com>
2015-07-09  9:48               ` Laurent Vivier
2015-07-09 10:02               ` Christoffer Dall
2015-07-09 12:21               ` Cornelia Huck
     [not found]               ` <559E435E.9050608@redhat.com>
2015-07-09 12:57                 ` Paolo Bonzini
2015-07-09 13:07                   ` Michael S. Tsirkin
2015-07-09 18:59                     ` Thomas Huth
2015-07-13  9:24               ` Greg Kurz
2015-07-03  7:59     ` [PULL] virtio/vhost: cross endian support Michael S. Tsirkin
     [not found]     ` <20150703095637-mutt-send-email-mst@redhat.com>
2015-07-03 22:26       ` Linus Torvalds
2015-07-01  9:31 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=20150702112809-mutt-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=gkurz@linux.vnet.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).