qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc Marí" <marc.mari.barcelo@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Stefan Hajnoczi <stefanha@gmail.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v7 2/7] tests: Add virtio device initialization
Date: Fri, 29 Aug 2014 21:45:24 +0200	[thread overview]
Message-ID: <20140829214524.6280728c@crunchbang> (raw)
In-Reply-To: <5400A369.3020403@redhat.com>

El Fri, 29 Aug 2014 17:59:37 +0200
Paolo Bonzini <pbonzini@redhat.com> escribió:
> Il 29/08/2014 17:49, Stefan Hajnoczi ha scritto:
> > for (i = 0; i < 8; ++i) {
> >     quad.bytes[i] = qpci_io_readb(dev->pdev, addr + i);
> > }
> > if (qtest_big_endian() != qtest_host_endian()) {
> >     quad.u64 = bswap64(quad.u64);
> > }
> > return quard.u64;
> 
> Why not keep the logic in Marc's patch, just replacing the union with
> OR and shift?
> 
> Paolo

With OR and shift is clearer than thinking about why the endianness
must be different (when looking at the code again), at least for me.

Thanks
Marc

  reply	other threads:[~2014-08-29 19:45 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-29 10:40 [Qemu-devel] [PATCH v7 0/7] Virtio PCI libqos driver Marc Marí
2014-08-29 10:40 ` [Qemu-devel] [PATCH v7 1/7] tests: Functions bus_foreach and device_find from libqos virtio API Marc Marí
2014-08-29 10:40 ` [Qemu-devel] [PATCH v7 2/7] tests: Add virtio device initialization Marc Marí
2014-08-29 15:49   ` Stefan Hajnoczi
2014-08-29 15:59     ` Paolo Bonzini
2014-08-29 19:45       ` Marc Marí [this message]
2014-09-01 15:22       ` Stefan Hajnoczi
2014-08-29 19:31     ` Marc Marí
2014-08-29 10:40 ` [Qemu-devel] [PATCH v7 3/7] libqos: Added basic virtqueue support to virtio implementation Marc Marí
2014-08-29 10:40 ` [Qemu-devel] [PATCH v7 4/7] libqos: Added indirect descriptor " Marc Marí
2014-08-29 10:40 ` [Qemu-devel] [PATCH v7 5/7] libqos: Added test case for configuration changes in virtio-blk test Marc Marí
2014-08-29 10:40 ` [Qemu-devel] [PATCH v7 6/7] libqos: Added MSI-X support Marc Marí
2014-08-29 10:40 ` [Qemu-devel] [PATCH v7 7/7] libqos: Added EVENT_IDX support Marc Marí

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=20140829214524.6280728c@crunchbang \
    --to=marc.mari.barcelo@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    --cc=stefanha@redhat.com \
    /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).