qemu/tests
Gao Shiyuan 55fa4be6f7 virtio-pci: fix memory_region_find for VirtIOPCIRegion's MR
As shown below, if a virtio PCI device is attached under a pci-bridge, the MR
of VirtIOPCIRegion does not belong to any address space. So memory_region_find
cannot be used to search for this MR.

Introduce the virtio-pci and pci_bridge address spaces to solve this problem.

Before:
memory-region: pci_bridge_pci
  0000000000000000-ffffffffffffffff (prio 0, i/o): pci_bridge_pci
    00000000fe840000-00000000fe840fff (prio 1, i/o): virtio-net-pci-msix
      00000000fe840000-00000000fe84003f (prio 0, i/o): msix-table
      00000000fe840800-00000000fe840807 (prio 0, i/o): msix-pba
    0000380000000000-0000380000003fff (prio 1, i/o): virtio-pci
      0000380000000000-0000380000000fff (prio 0, i/o): virtio-pci-common-virtio-net
      0000380000001000-0000380000001fff (prio 0, i/o): virtio-pci-isr-virtio-net
      0000380000002000-0000380000002fff (prio 0, i/o): virtio-pci-device-virtio-net
      0000380000003000-0000380000003fff (prio 0, i/o): virtio-pci-notify-virtio-net

After:
address-space: virtio-pci-cfg-mem-as
  0000380000000000-0000380000003fff (prio 1, i/o): virtio-pci
    0000380000000000-0000380000000fff (prio 0, i/o): virtio-pci-common-virtio-net
    0000380000001000-0000380000001fff (prio 0, i/o): virtio-pci-isr-virtio-net
    0000380000002000-0000380000002fff (prio 0, i/o): virtio-pci-device-virtio-net
    0000380000003000-0000380000003fff (prio 0, i/o): virtio-pci-notify-virtio-net

address-space: pci_bridge_pci_mem
  0000000000000000-ffffffffffffffff (prio 0, i/o): pci_bridge_pci
    00000000fe840000-00000000fe840fff (prio 1, i/o): virtio-net-pci-msix
      00000000fe840000-00000000fe84003f (prio 0, i/o): msix-table
      00000000fe840800-00000000fe840807 (prio 0, i/o): msix-pba
    0000380000000000-0000380000003fff (prio 1, i/o): virtio-pci
      0000380000000000-0000380000000fff (prio 0, i/o): virtio-pci-common-virtio-net
      0000380000001000-0000380000001fff (prio 0, i/o): virtio-pci-isr-virtio-net
      0000380000002000-0000380000002fff (prio 0, i/o): virtio-pci-device-virtio-net
      0000380000003000-0000380000003fff (prio 0, i/o): virtio-pci-notify-virtio-net

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2576
Fixes: ffa8a3e3b2 ("virtio-pci: Add lookup subregion of VirtIOPCIRegion MR")
Co-developed-by: Zuo Boqun <zuoboqun@baidu.com>
Signed-off-by: Zuo Boqun <zuoboqun@baidu.com>
Co-developed-by: Wang Liang <wangliang44@baidu.com>
Signed-off-by: Wang Liang <wangliang44@baidu.com>
Signed-off-by: Gao Shiyuan <gaoshiyuan@baidu.com>
Message-Id: <20241030131324.34144-1-gaoshiyuan@baidu.com>
Tested-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2024-11-04 16:03:24 -05:00
..
avocado tests/avocado: Boot Linux for RV32 cpu on RV64 QEMU 2024-10-30 11:22:07 +10:00
bench tests/bench: Rename test_akcipher_keys.inc -> test_akcipher_keys.c.inc 2024-09-20 10:08:24 +03:00
data tests/acpi: pc: update golden masters for DSDT 2024-11-04 16:03:24 -05:00
decode tests/: spelling fixes 2023-09-08 13:08:52 +03:00
docker dockerfiles: fix default targets for debian-loongarch-cross 2024-10-24 09:56:26 +01:00
fp tests/fp: Make mul and div tests have a longer timeout 2024-09-18 20:58:43 +01:00
functional tests/functional: Add a functional test for the sx1 board 2024-10-29 15:04:46 +00:00
guest-debug tests/guest-debug: Support passing arguments to the GDB test script 2024-09-10 23:33:55 +01:00
image-fuzzer
include
keys
lcitool tests: update lcitool to fix freebsd py311-yaml rename 2024-10-14 15:54:24 +01:00
migration tests/qtest/migration-test: Use custom asm bios for ppc64 2024-06-14 14:01:23 -03:00
multiboot
perf/block/qcow2
qapi-schema tests/qapi-schema: Drop temporary 'prefix' 2024-09-10 13:22:47 +02:00
qemu-iotests iotests/backup-discard-source: don't use actual-size 2024-10-22 17:52:49 +02:00
qtest virtio-pci: fix memory_region_find for VirtIOPCIRegion's MR 2024-11-04 16:03:24 -05:00
rocker
tcg testing, gdbstub and plugin updates 2024-10-25 19:12:06 +01:00
tsan block: remove AioContext locking 2023-12-21 22:49:27 +01:00
uefi-test-tools tests/data/uefi-boot-images: Add RISC-V ISO image 2024-07-03 18:14:06 -04:00
unit chardev: finalize 'reconnect' deprecation 2024-10-28 14:37:25 +08:00
vm tests/vm: update openbsd image to 7.6 2024-10-21 13:23:52 +02:00
vmstate-static-checker-data
dbus-vmstate-daemon.sh
Makefile.include tests/functional: enable pre-emptive caching of assets 2024-09-04 10:52:29 +02:00
meson.build tests/functional: Prepare the meson build system for the functional tests 2024-09-04 10:52:29 +02:00
test-qht-par.c
vhost-user-bridge.c