aboutsummaryrefslogtreecommitdiff
path: root/tests/libqos/virtio-pci.c
diff options
context:
space:
mode:
authorLaurent Vivier <lvivier@redhat.com>2016-10-17 12:30:22 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2016-10-28 09:36:58 +1100
commit8b4b80c37630e976f2dd02a7d42bd9bea1ce676e (patch)
treeda597dce591e2f8412ecb47e5f861cc5b1396ae1 /tests/libqos/virtio-pci.c
parent6b9cdf4cf1fd52c1a59a7640a02a718176bfd217 (diff)
tests: rename target_big_endian() as qvirtio_is_big_endian()
Move the definition to libqos/virtio.h as it must be used only with virtio functions. Add a QVirtioDevice parameter as it will be needed to know if the virtio device is using virtio 1.0 specification and thus is always little-endian (to do) Signed-off-by: Laurent Vivier <lvivier@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests/libqos/virtio-pci.c')
-rw-r--r--tests/libqos/virtio-pci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/libqos/virtio-pci.c b/tests/libqos/virtio-pci.c
index bbfed58dcf..7aa29b1a9c 100644
--- a/tests/libqos/virtio-pci.c
+++ b/tests/libqos/virtio-pci.c
@@ -86,7 +86,7 @@ static uint64_t qvirtio_pci_config_readq(QVirtioDevice *d, uint64_t addr)
int i;
uint64_t u64 = 0;
- if (target_big_endian()) {
+ if (qvirtio_is_big_endian(d)) {
for (i = 0; i < 8; ++i) {
u64 |= (uint64_t)qpci_io_readb(dev->pdev,
(void *)(uintptr_t)addr + i) << (7 - i) * 8;