All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alexander Graf <agraf@suse.de>
Cc: qemu-ppc@nongnu.org,
	"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/2] virtio-pci: Fix endianness of virtio config
Date: Wed, 11 Jan 2012 11:32:15 +1100	[thread overview]
Message-ID: <1326241935.23910.79.camel@pasglop> (raw)
In-Reply-To: <60A0E6EF-8B22-4340-9EB1-88AE10D32B68@suse.de>

On Wed, 2012-01-11 at 01:08 +0100, Alexander Graf wrote:
> On 11.01.2012, at 01:07, Anthony Liguori wrote:
> 
> > On 01/10/2012 06:07 PM, Alexander Graf wrote:
> >> From: Benjamin Herrenschmidt<benh@kernel.crashing.org>
> >> 
> >> The virtio config area in PIO space is a bit special. The initial
> >> header is little endian but the rest (device specific) is guest
> >> native endian.
> >> 
> >> The PIO accessors for PCI on machines that don't have native IO ports
> >> assume that all PIO is little endian, which works fine for everything
> >> except the above.
> >> 
> >> A complicated way to fix it would be to split the BAR into two memory
> >> regions with different endianess settings, but this isn't practical
> >> to do, besides, the PIO code doesn't honor region endianness anyway
> >> (I have a patch for that too but it isn't necessary at this stage).
> >> 
> >> So I decided to go for the quick fix instead which consists of
> >> reverting the swap in virtio-pci in selected places, hoping that when
> >> we eventually do a "v2" of the virtio protocols, we sort that out once
> >> and for all using a fixed endian setting for everything.
> >> 
> >> Unfortunately, that mean moving virtio-pci from Makefile.objs to
> >> Makefile.target so we can use TARGET_WORDS_BIGENDIAN which would
> >> otherwise be poisoned.
> >> 
> >> Signed-off-by: Benjamin Herrenschmidt<benh@kernel.crashing.org>
> >> Signed-off-by: Alexander Graf<agraf@suse.de>
> >> [agraf: keep virtio in libhw and determine endianness through a
> >>         helper function in exec.c]
> > 
> > Both:
> > 
> > Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
> 
> Cool :). Queued up in ppc-next.

Fix the commit log, you aren't moving it to Makefile.target anymore :-)

Cheers,
Ben.

      reply	other threads:[~2012-01-11  0:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11  0:07 [Qemu-devel] [PATCH 1/2] virtio-pci: Fix endianness of virtio config Alexander Graf
2012-01-11  0:07 ` [Qemu-devel] [PATCH 2/2] virtio: change memcpy to guest reads Alexander Graf
2012-01-11  0:07 ` [Qemu-devel] [PATCH 1/2] virtio-pci: Fix endianness of virtio config Anthony Liguori
2012-01-11  0:08   ` Alexander Graf
2012-01-11  0:32     ` Benjamin Herrenschmidt [this message]

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=1326241935.23910.79.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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.