mbox series

[v5,0/8] pci_expander_brdige:acpi:Support pxb-pcie for ARM

Message ID 20200407105706.1920-1-miaoyubo@huawei.com
Headers show
Series pci_expander_brdige:acpi:Support pxb-pcie for ARM | expand

Message

Yubo Miao April 7, 2020, 10:56 a.m. UTC
From: miaoyubo <miaoyubo@huawei.com>

Changes with v4
v5->v4: Not using specific resources for PXB.
Instead, the resources for pxb are composed of the bar space of the
pci-bridge/pcie-root-port behined it and the config space of devices
behind it.

Only if the bios(uefi for arm) support multiple roots,
configure space of devices behind pxbs could be obtained.
The uefi work is updated for discussion by the following link:
https://edk2.groups.io/g/devel/message/56901?p=,,,20,0,0,0::Created,,add+extra+roots+for+Arm,20,2,0,72723351 
[PATCH] ArmVirtPkg/FdtPciHostBridgeLib: add extra roots for Arm.

Currently pxb-pcie is not supported by arm,
the reason for it is pxb-pcie is not described in DSDT table
and only one main host bridge is described in acpi tables,
which means it is not impossible to present different io numas
for different devices.

This series of patches make arm to support PXB-PCIE.

Users can configure pxb-pcie with certain numa, Example command
is:

   -device pxb-pcie,id=pci.7,bus_nr=128,numa_node=0,bus=pcie.0,addr=0x9


miaoyubo (8):
  acpi:Extract two APIs from acpi_dsdt_add_pci
  fw_cfg: Write the extra roots into the fw_cfg
  acpi:Extract crs build form acpi_build.c
  acpi: Refactor the source of host bridge and build tables for pxb
  acpi: align the size to 128k
  unit-test: The files changed.
  unit-test: Add testcase for pxb
  unit-test: add the binary file and clear diff.h

 hw/acpi/aml-build.c            | 275 +++++++++++++++++++++++++++++++
 hw/arm/virt-acpi-build.c       | 251 ++++++++++++++++++++++-------
 hw/arm/virt.c                  |  23 +++
 hw/i386/acpi-build.c           | 285 ---------------------------------
 include/hw/acpi/aml-build.h    |  23 +++
 tests/data/acpi/virt/DSDT.pxb  | Bin 0 -> 7802 bytes
 tests/qtest/bios-tables-test.c |  58 ++++++-
 7 files changed, 564 insertions(+), 351 deletions(-)
 create mode 100644 tests/data/acpi/virt/DSDT.pxb

Comments

no-reply@patchew.org April 7, 2020, 12:32 p.m. UTC | #1
Patchew URL: https://patchew.org/QEMU/20200407105706.1920-1-miaoyubo@huawei.com/



Hi,

This series failed the asan build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-debug@fedora TARGET_LIST=x86_64-softmmu J=14 NETWORK=1
=== TEST SCRIPT END ===

  CC      x86_64-softmmu/softmmu/main.o
  CC      x86_64-softmmu/gdbstub-xml.o
  CC      x86_64-softmmu/trace/generated-helpers.o
/tmp/qemu-test/src/hw/i386/acpi-build.c:1685:9: error: implicit declaration of function 'crs_range_insert' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        crs_range_insert(crs_range_set.mem_ranges,
        ^
/tmp/qemu-test/src/hw/i386/acpi-build.c:1685:9: note: did you mean 'g_string_insert'?
/usr/include/glib-2.0/glib/gstring.h:106:14: note: 'g_string_insert' declared here
GString*     g_string_insert            (GString         *string,
             ^
/tmp/qemu-test/src/hw/i386/acpi-build.c:1685:9: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
        crs_range_insert(crs_range_set.mem_ranges,
        ^
2 errors generated.
make[1]: *** [/tmp/qemu-test/src/rules.mak:69: hw/i386/acpi-build.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:527: x86_64-softmmu/all] Error 2
Traceback (most recent call last):
  File "./tests/docker/docker.py", line 664, in <module>
    sys.exit(main())
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=c565fd49fbf84796a55fba7c0ed9d0f5', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=x86_64-softmmu', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-tyd3qx2e/src/docker-src.2020-04-07-08.28.24.20006:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-debug']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=c565fd49fbf84796a55fba7c0ed9d0f5
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-tyd3qx2e/src'
make: *** [docker-run-test-debug@fedora] Error 2

real    3m45.813s
user    0m8.153s


The full log is available at
http://patchew.org/logs/20200407105706.1920-1-miaoyubo@huawei.com/testing.asan/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
no-reply@patchew.org April 7, 2020, 12:39 p.m. UTC | #2
Patchew URL: https://patchew.org/QEMU/20200407105706.1920-1-miaoyubo@huawei.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [PATCH v5 0/8] pci_expander_brdige:acpi:Support pxb-pcie for ARM
Message-id: 20200407105706.1920-1-miaoyubo@huawei.com
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

Switched to a new branch 'test'
27a7b3d unit-test: add the binary file and clear diff.h
098d947 unit-test: Add testcase for pxb
43ed769 unit-test: The files changed.
3cfb18f acpi: align the size to 128k
0c920d9 acpi: Refactor the source of host bridge and build tables for pxb
1043623 acpi:Extract crs build form acpi_build.c
776ec24 fw_cfg: Write the extra roots into the fw_cfg
f660b50 acpi:Extract two APIs from acpi_dsdt_add_pci

=== OUTPUT BEGIN ===
1/8 Checking commit f660b50acf36 (acpi:Extract two APIs from acpi_dsdt_add_pci)
2/8 Checking commit 776ec24ca7b9 (fw_cfg: Write the extra roots into the fw_cfg)
3/8 Checking commit 104362358b93 (acpi:Extract crs build form acpi_build.c)
4/8 Checking commit 0c920d9293fe (acpi: Refactor the source of host bridge and build tables for pxb)
5/8 Checking commit 3cfb18f7bc91 (acpi: align the size to 128k)
6/8 Checking commit 43ed7693d63f (unit-test: The files changed.)
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/arm/virt-acpi-build.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and hw/arm/virt-acpi-build.c found

total: 2 errors, 0 warnings, 2 lines checked

Patch 6/8 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

7/8 Checking commit 098d947a00b8 (unit-test: Add testcase for pxb)
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and tests/qtest/bios-tables-test.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and tests/qtest/bios-tables-test.c found

total: 2 errors, 0 warnings, 76 lines checked

Patch 7/8 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

8/8 Checking commit 27a7b3d1bc62 (unit-test: add the binary file and clear diff.h)
ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/data/acpi/virt/DSDT.pxb and tests/qtest/bios-tables-test.c found

WARNING: added, moved or deleted file(s), does MAINTAINERS need updating?
#13: 
new file mode 100644

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and tests/qtest/bios-tables-test.c found

ERROR: Do not add expected files together with tests, follow instructions in tests/qtest/bios-tables-test.c: both tests/qtest/bios-tables-test-allowed-diff.h and tests/qtest/bios-tables-test.c found

total: 3 errors, 1 warnings, 1 lines checked

Patch 8/8 has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200407105706.1920-1-miaoyubo@huawei.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
no-reply@patchew.org April 7, 2020, 12:42 p.m. UTC | #3
Patchew URL: https://patchew.org/QEMU/20200407105706.1920-1-miaoyubo@huawei.com/



Hi,

This series failed the docker-quick@centos7 build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#!/bin/bash
make docker-image-centos7 V=1 NETWORK=1
time make docker-test-quick@centos7 SHOW_ENV=1 J=14 NETWORK=1
=== TEST SCRIPT END ===

  CC      x86_64-softmmu/target/i386/kvm.o
  CC      aarch64-softmmu/qapi/qapi-visit-misc-target.o
/tmp/qemu-test/src/hw/i386/acpi-build.c: In function 'build_dsdt':
/tmp/qemu-test/src/hw/i386/acpi-build.c:1685:9: error: implicit declaration of function 'crs_range_insert' [-Werror=implicit-function-declaration]
         crs_range_insert(crs_range_set.mem_ranges,
         ^
/tmp/qemu-test/src/hw/i386/acpi-build.c:1685:9: error: nested extern declaration of 'crs_range_insert' [-Werror=nested-externs]
cc1: all warnings being treated as errors
make[1]: *** [hw/i386/acpi-build.o] Error 1
make[1]: *** Waiting for unfinished jobs....
  CC      aarch64-softmmu/qapi/qapi-visit.o
  CC      aarch64-softmmu/qapi/qapi-events-machine-target.o
---
  CC      aarch64-softmmu/target/arm/monitor.o
  CC      aarch64-softmmu/target/arm/arm-powerctl.o
  CC      aarch64-softmmu/target/arm/kvm-stub.o
make: *** [x86_64-softmmu/all] Error 2
make: *** Waiting for unfinished jobs....
  CC      aarch64-softmmu/target/arm/tlb_helper.o
  CC      aarch64-softmmu/target/arm/debug_helper.o
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=d4dd4c8388c64d7d9a68f10726bbc6ff', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-lkigtspb/src/docker-src.2020-04-07-08.40.05.26772:/var/tmp/qemu:z,ro', 'qemu:centos7', '/var/tmp/qemu/run', 'test-quick']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=d4dd4c8388c64d7d9a68f10726bbc6ff
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-lkigtspb/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    2m51.066s
user    0m8.488s


The full log is available at
http://patchew.org/logs/20200407105706.1920-1-miaoyubo@huawei.com/testing.docker-quick@centos7/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
no-reply@patchew.org April 7, 2020, 12:46 p.m. UTC | #4
Patchew URL: https://patchew.org/QEMU/20200407105706.1920-1-miaoyubo@huawei.com/



Hi,

This series failed the docker-mingw@fedora build test. Please find the testing commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.

=== TEST SCRIPT BEGIN ===
#! /bin/bash
export ARCH=x86_64
make docker-image-fedora V=1 NETWORK=1
time make docker-test-mingw@fedora J=14 NETWORK=1
=== TEST SCRIPT END ===

  CC      aarch64-softmmu/qapi/qapi-visit-machine-target.o
  CC      aarch64-softmmu/qapi/qapi-visit-misc-target.o
/tmp/qemu-test/src/hw/i386/acpi-build.c: In function 'build_dsdt':
/tmp/qemu-test/src/hw/i386/acpi-build.c:1685:9: error: implicit declaration of function 'crs_range_insert'; did you mean 'g_string_insert'? [-Werror=implicit-function-declaration]
         crs_range_insert(crs_range_set.mem_ranges,
         ^~~~~~~~~~~~~~~~
         g_string_insert
/tmp/qemu-test/src/hw/i386/acpi-build.c:1685:9: error: nested extern declaration of 'crs_range_insert' [-Werror=nested-externs]
cc1: all warnings being treated as errors
make[1]: *** [/tmp/qemu-test/src/rules.mak:69: hw/i386/acpi-build.o] Error 1
make: *** [Makefile:527: x86_64-softmmu/all] Error 2
make: *** Waiting for unfinished jobs....
  CC      aarch64-softmmu/qapi/qapi-visit.o
  CC      aarch64-softmmu/qapi/qapi-events-machine-target.o
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=0e299c1a0e834c4db048bae911f931dd', '-u', '1003', '--security-opt', 'seccomp=unconfined', '--rm', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=14', '-e', 'DEBUG=', '-e', 'SHOW_ENV=', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/home/patchew2/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-lrs62r3y/src/docker-src.2020-04-07-08.43.27.3884:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 2.
filter=--filter=label=com.qemu.instance.uuid=0e299c1a0e834c4db048bae911f931dd
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-lrs62r3y/src'
make: *** [docker-run-test-mingw@fedora] Error 2

real    2m51.764s
user    0m8.212s


The full log is available at
http://patchew.org/logs/20200407105706.1920-1-miaoyubo@huawei.com/testing.docker-mingw@fedora/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com