All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Rusty Russell <rusty@rustcorp.com.au>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio.
Date: Mon, 12 Aug 2013 07:56:28 -0500	[thread overview]
Message-ID: <87txivrrsz.fsf@codemonkey.ws> (raw)
In-Reply-To: <1376299687.32100.159.camel@pasglop>

Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:

> On Mon, 2013-08-12 at 17:29 +0930, Rusty Russell wrote:
>> virtio data structures are defined as "target endian", which assumes
>> that's a fixed value.  In fact, that actually means it's
>> platform-specific.
>> 
>> Hopefully the OASIS virtio 1.0 spec will fix this.  Meanwhile, create
>> a hook for little endian ppc.
>
> Ok, sorry if I missed a previous debate on that one but why do you do a
> call-out to architecture specific stuff (that is not even inline) on
> every access ?

Let's focus on getting something merged.  Then we can muck around with
it down the road.

Having target-ppc call into virtio is a layering violation.  This
approach keeps the dependencies cleaner.

Regards,

Anthony Liguori

>
> If we consider that virtio byte order is global, can't you make it a
> global that is *set* by the architecture rather than *polled* by
> virtio ?
>
> We have explicit knowledge of when our endianness change (we get the
> hcall or a write to some SPR), we can call virtio *then* to adjust the
> endianness rather than having a call-out to the platform on every
> access.
>
> Ben.

  parent reply	other threads:[~2013-08-12 12:56 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12  7:59 [Qemu-devel] [PATCH 0/8] virtio for endian curious guests Take #2 Rusty Russell
2013-08-12  7:59 ` [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio Rusty Russell
2013-08-12  9:28   ` Benjamin Herrenschmidt
2013-08-12  9:39     ` Peter Maydell
2013-08-12  9:43       ` Benjamin Herrenschmidt
2013-08-12  9:45         ` Peter Maydell
2013-08-12  9:50           ` Benjamin Herrenschmidt
2013-08-12  9:52             ` Peter Maydell
2013-08-12  9:56               ` Benjamin Herrenschmidt
2013-08-12 10:36                 ` Peter Maydell
2013-08-12 12:56     ` Anthony Liguori [this message]
2013-08-13  4:20       ` Rusty Russell
2013-08-13  5:30         ` Benjamin Herrenschmidt
2013-08-14  0:03           ` Rusty Russell
2013-09-06  2:27     ` Rusty Russell
2013-08-12  7:59 ` [Qemu-devel] [PATCH 2/8] target-ppc: ppc64 target's virtio can be either endian Rusty Russell
2013-08-12  7:59 ` [Qemu-devel] [PATCH 3/8] virtio: allow byte swapping for vring and config access Rusty Russell
2013-09-09 12:44   ` [Qemu-devel] [PATCH] hw/9pfs/virtio_9p_device: use virtio wrappers to access headers Greg Kurz
2013-09-10  5:21     ` Rusty Russell
  -- strict thread matches above, loose matches on Subject: below --
2014-02-18 12:38 [Qemu-devel] [PATCH 0/8] virtio endian-ambivalent target fixes (rebased) Greg Kurz
2014-02-18 12:38 ` [Qemu-devel] [PATCH 1/8] virtio_get_byteswap: function for endian-ambivalent targets using virtio Greg Kurz
2014-02-18 14:48   ` Alexander Graf
2014-02-18 15:03     ` Michael S. Tsirkin
2014-02-18 15:02       ` Alexander Graf
2014-02-18 15:11         ` Michael S. Tsirkin
2014-02-18 15:07           ` Alexander Graf
2014-02-18 15:04       ` Michael S. Tsirkin
2014-02-18 15:12       ` Cornelia Huck
2014-02-18 15:45         ` Cornelia Huck
2014-02-18 16:02           ` Alexander Graf
2014-02-18 16:17             ` Cornelia Huck
2014-02-18 16:21               ` Alexander Graf
2014-02-20 23:26                 ` Rusty Russell
2014-02-18 23:02     ` Andreas Färber
2014-02-18 19:25   ` Andreas Färber
2014-02-19 10:06     ` Greg Kurz
2014-02-20 23:19       ` Rusty Russell

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=87txivrrsz.fsf@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=benh@kernel.crashing.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rusty@rustcorp.com.au \
    /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.