]> git.proxmox.com Git - mirror_qemu.git/commit
libqos: Implement mmio accessors in terms of mem{read,write}
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 19 Oct 2016 03:20:44 +0000 (14:20 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 27 Oct 2016 22:38:27 +0000 (09:38 +1100)
commit352d664cce514a94228fbf6e05d03920b2d6bd69
tree8bbad2bc422cf795483df500634269d40cff3fd3
parent9a84f889471de50144632100109f93aabea68ff6
libqos: Implement mmio accessors in terms of mem{read,write}

In the libqos PCI code we now have accessors both for registers (byte
significance preserving) and for streaming data (byte address order
preserving).  These exist in both the interface for qtest drivers and in
the machine specific backends.

However, the register-style accessors aren't actually necessary in the
backend.  They can be implemented in terms of the byte address order
preserving accessors by the libqos wrappers.  This works because PCI is
always little endian.

This does assume that the back end byte address order preserving accessors
will perform the equivalent of a single bus transaction for short lengths.
This is the case, and in fact they currently end up using the same
cpu_physical_memory_rw() implementation within the qtest accelerator.

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