[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v7 2/7] tests: Add virtio device initialization
From: |
Marc Marí |
Subject: |
Re: [Qemu-devel] [PATCH v7 2/7] tests: Add virtio device initialization |
Date: |
Fri, 29 Aug 2014 21:45:24 +0200 |
El Fri, 29 Aug 2014 17:59:37 +0200
Paolo Bonzini <address@hidden> 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
- [Qemu-devel] [PATCH v7 0/7] Virtio PCI libqos driver, Marc Marí, 2014/08/29
- [Qemu-devel] [PATCH v7 3/7] libqos: Added basic virtqueue support to virtio implementation, Marc Marí, 2014/08/29
- [Qemu-devel] [PATCH v7 4/7] libqos: Added indirect descriptor support to virtio implementation, Marc Marí, 2014/08/29
- [Qemu-devel] [PATCH v7 5/7] libqos: Added test case for configuration changes in virtio-blk test, Marc Marí, 2014/08/29
- [Qemu-devel] [PATCH v7 6/7] libqos: Added MSI-X support, Marc Marí, 2014/08/29
- [Qemu-devel] [PATCH v7 7/7] libqos: Added EVENT_IDX support, Marc Marí, 2014/08/29