From: Stefan Hajnoczi <stefanha@redhat.com>
To: "Marc Marí" <marc.mari.barcelo@gmail.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v4 02/11] tests: Add virtio device initialization
Date: Wed, 13 Aug 2014 17:52:00 +0100 [thread overview]
Message-ID: <20140813165200.GD27053@stefanha-thinkpad.redhat.com> (raw)
In-Reply-To: <1407843716-18301-3-git-send-email-marc.mari.barcelo@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 562 bytes --]
On Tue, Aug 12, 2014 at 01:41:47PM +0200, Marc Marí wrote:
> +static uint64_t qvirtio_pci_config_readq(QVirtioDevice *d, void *addr)
> +{
> + QVirtioPCIDevice *dev = (QVirtioPCIDevice *)d;
> + return qpci_io_readl(dev->pdev, addr) | qpci_io_readl(dev->pdev, addr+4);
This is broken because it never shifts bits into the upper 32 bits.
Which value to shift up depends on endianness. Another solution is to
do byte reads into a uint64_t variable like memcpy.
I suggest you simply drop 64-bit accesses for now since they are
probably not used.
[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2014-08-13 16:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-12 11:41 [Qemu-devel] [PATCH v4 00/11] Virtio PCI libqos driver Marc Marí
2014-08-12 11:41 ` [Qemu-devel] [PATCH v4 01/11] tests: Functions bus_foreach and device_find from libqos virtio API Marc Marí
2014-08-13 16:52 ` Stefan Hajnoczi
2014-08-12 11:41 ` [Qemu-devel] [PATCH v4 02/11] tests: Add virtio device initialization Marc Marí
2014-08-13 16:52 ` Stefan Hajnoczi [this message]
2014-08-12 11:41 ` [Qemu-devel] [PATCH v4 03/11] libqtest: add QTEST_LOG for debugging qtest testcases Marc Marí
2014-08-13 16:53 ` Stefan Hajnoczi
2014-08-13 16:56 ` Stefan Hajnoczi
2014-08-12 11:41 ` [Qemu-devel] [PATCH v4 04/11] libqos: Correct mask to align size to PAGE_SIZE in malloc-pc Marc Marí
2014-08-13 16:56 ` Stefan Hajnoczi
2014-08-12 11:41 ` [Qemu-devel] [PATCH v4 05/11] libqos: Change free function called in malloc Marc Marí
2014-08-13 16:56 ` Stefan Hajnoczi
2014-08-12 11:41 ` [Qemu-devel] [PATCH v4 06/11] virtio-blk: Correct bug in support for flexible descriptor layout Marc Marí
2014-08-13 16:56 ` Stefan Hajnoczi
2014-08-12 11:41 ` [Qemu-devel] [PATCH v4 07/11] libqos: Added basic virtqueue support to virtio implementation Marc Marí
2014-08-13 17:27 ` Stefan Hajnoczi
2014-08-13 21:59 ` Marc Marí
2014-08-17 9:37 ` Paolo Bonzini
2014-08-12 11:41 ` [Qemu-devel] [PATCH v4 08/11] libqos: Added indirect descriptor " Marc Marí
2014-08-12 11:41 ` [Qemu-devel] [PATCH v4 09/11] libqos: Added test case for configuration changes in virtio-blk test Marc Marí
2014-08-13 17:34 ` Stefan Hajnoczi
2014-08-12 11:41 ` [Qemu-devel] [PATCH v4 10/11] libqos: Added MSI-X support Marc Marí
2014-08-12 11:41 ` [Qemu-devel] [PATCH v4 11/11] 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=20140813165200.GD27053@stefanha-thinkpad.redhat.com \
--to=stefanha@redhat.com \
--cc=marc.mari.barcelo@gmail.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@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 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).