libqos: Add streaming accessors for PCI MMIO
commit9a84f889471de50144632100109f93aabea68ff6
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 19 Oct 2016 03:19:47 +0000 (19 14:19 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 27 Oct 2016 22:38:27 +0000 (28 09:38 +1100)
treed327b0d9d9e78a31683b9a78599dd25b2ec24b35
parent9ff50be2ffb3c116811cfc63dd1fa0ef8c4a9c75
libqos: Add streaming accessors for PCI MMIO

Currently PCI memory (aka MMIO) space is accessed via a set of readb/writeb
style accessors.  This is what we want for accessing discrete registers of
a certain size.  However, there are a few cases where we instead need a
"bag of bytes" style streaming interface to PCI MMIO space.  This can be
either for streaming data style registers or when there's actual memory
rather than registers in PCI space, for example frame buffers or ivshmem.

This patch adds backend callbacks, and libqos wrappers for this type of
byte address order preserving accesses.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
tests/libqos/pci-pc.c
tests/libqos/pci-spapr.c
tests/libqos/pci.c
tests/libqos/pci.h