qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kurz <gkurz@linux.vnet.ibm.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Cedric Le Goater <clg@fr.ibm.com>,
	qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	virtualization@lists.linux-foundation.org,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures
Date: Fri, 13 Mar 2015 09:03:12 +0100	[thread overview]
Message-ID: <20150313090312.742d135c@bahia.local> (raw)
In-Reply-To: <5501BDEB.5080603@redhat.com>

On Thu, 12 Mar 2015 17:25:15 +0100
Paolo Bonzini <pbonzini@redhat.com> wrote:
> 
> 
> On 12/03/2015 08:08, Michael S. Tsirkin wrote:
> > But common header format is simple, it's always LE.
> > It does not depend on target.
> > To me this looks like a bug in memory_region_add_eventfd,
> > it should do the right thing depending on device
> > endian-ness.
> 
> I agree it seems to be a QEMU bug.
> 
> Paolo
> 

Yes you're right ! QEMU swaps the virtqueue id (adjust_endianness) according
to TARGET_WORDS, like it was coming from the guest but in fact it comes from
the host. The id should be fixed according to HOST_WORDS instead. Of course
this went unnoticed until TARGET_WORDS_BIGENDIAN != HOST_WORDS_BIGENDIAN,
which we have now with ppc64le hosts.

Patches to follow.

Thanks.

--
Greg

  reply	other threads:[~2015-03-13  8:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-11 18:04 [Qemu-devel] [PATCH] virtio-pci: fix host notifiers on bi-endian architectures Greg Kurz
2015-03-11 20:06 ` Michael S. Tsirkin
2015-03-11 22:03   ` Greg Kurz
2015-03-11 22:18     ` [Qemu-devel] [Qemu-ppc] " Benjamin Herrenschmidt
2015-03-11 22:52       ` Greg Kurz
2015-03-12  7:10         ` Michael S. Tsirkin
2015-03-12  7:08     ` [Qemu-devel] " Michael S. Tsirkin
2015-03-12 16:25       ` Paolo Bonzini
2015-03-13  8:03         ` Greg Kurz [this message]
2015-03-13  8:11           ` [Qemu-devel] [PATCH 1/2] memory: make adjust_endianness() generic Greg Kurz
2015-03-13  8:11           ` [Qemu-devel] [PATCH 2/2] memory: fix the eventfd data endianness according to the host Greg Kurz
2015-03-13 11:06             ` Paolo Bonzini
2015-03-13 11:32               ` Greg Kurz
2015-03-13 14:52                 ` Paolo Bonzini
2015-03-13 15:24                   ` Michael S. Tsirkin
2015-03-13 14:23               ` 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=20150313090312.742d135c@bahia.local \
    --to=gkurz@linux.vnet.ibm.com \
    --cc=clg@fr.ibm.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.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).