]> xenbits.xensource.com Git - qemu-xen.git/commit
tests/qtest/libqos/pci: Introduce pio_limit
authorEric Auger <eric.auger@redhat.com>
Wed, 4 May 2022 15:20:23 +0000 (17:20 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 12 May 2022 10:07:06 +0000 (12:07 +0200)
commit3df72d1c5500347eac0b5b6d9894713dc443a079
tree93b0bc1da8f32e94d8478d31b16849bec1c9746c
parent76acef2b735729c642c54385b7566de509506d9a
tests/qtest/libqos/pci: Introduce pio_limit

At the moment the IO space limit is hardcoded to
QPCI_PIO_LIMIT = 0x10000. When accesses are performed to a bar,
the base address of this latter is compared against the limit
to decide whether we perform an IO or a memory access.

On ARM, we cannot keep this PIO limit as the arm-virt machine
uses [0x3eff0000, 0x3f000000 ] for the IO space map and we
are mandated to allocate at 0x0.

Add a new flag in QPCIBar indicating whether it is an IO bar
or a memory bar. This flag is set on QPCIBar allocation and
provisionned based on the BAR configuration. Then the new flag
is used in access functions and in iomap() function.

Signed-off-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20220504152025.1785704-2-eric.auger@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
tests/qtest/libqos/pci-pc.c
tests/qtest/libqos/pci-spapr.c
tests/qtest/libqos/pci.c
tests/qtest/libqos/pci.h