[PATCH v8 0/8] pci_expander_brdige:acpi: Support pxb-pcie for ARM

Yubo Miao posted 8 patches 1 week ago
Test docker-mingw@fedora passed
Test checkpatch failed
Test asan passed
Test docker-quick@centos7 failed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200521033631.1605-1-miaoyubo@huawei.com
Maintainers: Eduardo Habkost <ehabkost@redhat.com>, Gerd Hoffmann <kraxel@redhat.com>, Richard Henderson <rth@twiddle.net>, Laurent Vivier <lvivier@redhat.com>, Igor Mammedov <imammedo@redhat.com>, Thomas Huth <thuth@redhat.com>, Shannon Zhao <shannon.zhaosl@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, "Philippe Mathieu-Daudé" <philmd@redhat.com>, Laszlo Ersek <lersek@redhat.com>, Peter Maydell <peter.maydell@linaro.org>
hw/acpi/aml-build.c            | 275 +++++++++++++++++++++++++++++++
hw/arm/virt-acpi-build.c       | 249 +++++++++++++++++++++-------
hw/arm/virt.c                  |   8 +
hw/i386/acpi-build.c           | 285 ---------------------------------
hw/i386/pc.c                   |  18 +--
hw/nvram/fw_cfg.c              |  20 +++
include/hw/acpi/aml-build.h    |  25 +++
include/hw/nvram/fw_cfg.h      |   2 +
include/hw/pci/pcie_host.h     |   4 +
tests/data/acpi/virt/DSDT.pxb  | Bin 0 -> 7802 bytes
tests/qtest/bios-tables-test.c |  58 ++++++-
11 files changed, 579 insertions(+), 365 deletions(-)
create mode 100644 tests/data/acpi/virt/DSDT.pxb

[PATCH v8 0/8] pci_expander_brdige:acpi: Support pxb-pcie for ARM

Posted by Yubo Miao 1 week ago
Changes with v7
v7->v8:
Fix the error:no member named 'fw_cfg' in 'struct PCMachineState'

I have one question for patch
[PATCH v8 8/8] unit-test: Add the binary file and clear diff.

I followed instructions in tests/qtest/bios-tables-test.c
to updated golden master binaries and empty
tests/qtest/bios-tables-test-allowed-diff.h.

However, checkpatch.pl would report the error
ERROR: Do not add expected files together with tests.

Does the error matters?

Changes with v6
v6->v7:
Refactor fw_cfg_write_extra_pci_roots
Add API PCI_GET_PCIE_HOST_STATE
Fix typos

Changes with v5
v5->v6: stat crs_range_insert in aml_build.h

Changes with v4
v4->v5: 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

Yubo Miao (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       | 249 +++++++++++++++++++++-------
 hw/arm/virt.c                  |   8 +
 hw/i386/acpi-build.c           | 285 ---------------------------------
 hw/i386/pc.c                   |  18 +--
 hw/nvram/fw_cfg.c              |  20 +++
 include/hw/acpi/aml-build.h    |  25 +++
 include/hw/nvram/fw_cfg.h      |   2 +
 include/hw/pci/pcie_host.h     |   4 +
 tests/data/acpi/virt/DSDT.pxb  | Bin 0 -> 7802 bytes
 tests/qtest/bios-tables-test.c |  58 ++++++-
 11 files changed, 579 insertions(+), 365 deletions(-)
 create mode 100644 tests/data/acpi/virt/DSDT.pxb

-- 
2.19.1



Re: [PATCH v8 0/8] pci_expander_brdige:acpi: Support pxb-pcie for ARM

Posted by no-reply@patchew.org 1 week ago
Patchew URL: https://patchew.org/QEMU/20200521033631.1605-1-miaoyubo@huawei.com/



Hi,

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

Message-id: 20200521033631.1605-1-miaoyubo@huawei.com
Subject: [PATCH v8 0/8] pci_expander_brdige:acpi: Support pxb-pcie for ARM
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'
b067a12 unit-test: Add the binary file and clear diff.h
93ad0f2 unit-test: Add testcase for pxb
1c7bcb1 unit-test: The files changed.
ad5fafc acpi: Align the size to 128k
a08c69e acpi: Refactor the source of host bridge and build tables for pxb
e1ad9a4 acpi: Extract crs build form acpi_build.c
c96e0de fw_cfg: Write the extra roots into the fw_cfg
887ac48 acpi: Extract two APIs from acpi_dsdt_add_pci

=== OUTPUT BEGIN ===
1/8 Checking commit 887ac4803f07 (acpi: Extract two APIs from acpi_dsdt_add_pci)
2/8 Checking commit c96e0de90d7e (fw_cfg: Write the extra roots into the fw_cfg)
3/8 Checking commit e1ad9a46a3b0 (acpi: Extract crs build form acpi_build.c)
4/8 Checking commit a08c69ea4ea9 (acpi: Refactor the source of host bridge and build tables for pxb)
5/8 Checking commit ad5fafcf0ee5 (acpi: Align the size to 128k)
6/8 Checking commit 1c7bcb134bf5 (unit-test: The files changed.)
7/8 Checking commit 93ad0f2148c0 (unit-test: Add testcase for pxb)
8/8 Checking commit b067a1263eb6 (unit-test: Add the binary file and clear diff.h)
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/data/acpi/virt/DSDT.pxb and tests/qtest/bios-tables-test-allowed-diff.h found

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-allowed-diff.h found

total: 2 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/20200521033631.1605-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

Re: [PATCH v8 0/8] pci_expander_brdige:acpi: Support pxb-pcie for ARM

Posted by no-reply@patchew.org 1 week ago
Patchew URL: https://patchew.org/QEMU/20200521033631.1605-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 ===

  TEST    check-qtest-x86_64: tests/qtest/qom-test
socket_accept failed: Resource temporarily unavailable
**
ERROR:/tmp/qemu-test/src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
/tmp/qemu-test/src/tests/qtest/libqtest.c:175: kill_qemu() detected QEMU death from signal 15 (Terminated)
ERROR - Bail out! ERROR:/tmp/qemu-test/src/tests/qtest/libqtest.c:301:qtest_init_without_qmp_handshake: assertion failed: (s->fd >= 0 && s->qmp_fd >= 0)
make: *** [check-qtest-x86_64] Error 1
make: *** Waiting for unfinished jobs....
  TEST    iotest-qcow2: 220
  TEST    iotest-qcow2: 226
---
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['sudo', '-n', 'docker', 'run', '--label', 'com.qemu.instance.uuid=fba0d148ea2d4da7b4a208babcd55f63', '-u', '1001', '--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/patchew/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-5gx31uix/src/docker-src.2020-05-20-23.47.40.24884:/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=fba0d148ea2d4da7b4a208babcd55f63
make[1]: *** [docker-run] Error 1
make[1]: Leaving directory `/var/tmp/patchew-tester-tmp-5gx31uix/src'
make: *** [docker-run-test-quick@centos7] Error 2

real    23m10.014s
user    0m9.319s


The full log is available at
http://patchew.org/logs/20200521033631.1605-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