tests: fix qvirtqueue_kick
commite49f827725d53d2fb1b8ec42db96c442d0caf6cd
authorLaurent Vivier <lvivier@redhat.com>
Sat, 27 Aug 2016 20:34:14 +0000 (27 16:34 -0400)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 13 Sep 2016 10:00:57 +0000 (13 11:00 +0100)
treeb7839b0c7135d5b1274b64d7a6bbe6f02aaa72d5
parent049105a3c1134bb27f52d3a6ec4e92a3d5278800
tests: fix qvirtqueue_kick

vq->avail.idx and vq->avail->ring[] are a 16bit values,
so read and write them with readw()/writew() instead of
readl()/writel().

To read/write a 16bit value with a 32bit accessor works fine
on little-endian CPU but not on big endian CPU.

[An equivalent patch for the writew() calls was also sent by
Zhang Shuai <zhangshuai13@huawei.com>.
--Stefan]

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Message-id: 1472330054-22607-1-git-send-email-lvivier@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
tests/libqos/virtio.c