[RFC PATCH 0/4] hw/arm/virt-acpi-build: Introduce iommu option for pci root bus

Wang Xingang posted 4 patches 3 years, 2 months ago
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1614329353-2124-1-git-send-email-wangxingang5@huawei.com
Maintainers: Peter Maydell <peter.maydell@linaro.org>, Marcel Apfelbaum <marcel.apfelbaum@gmail.com>, Igor Mammedov <imammedo@redhat.com>, Shannon Zhao <shannon.zhaosl@gmail.com>, "Michael S. Tsirkin" <mst@redhat.com>
There is a newer version of this series
hw/arm/virt-acpi-build.c            | 88 +++++++++++++++++++++--------
hw/arm/virt.c                       | 29 ++++++++++
hw/pci-bridge/pci_expander_bridge.c |  6 ++
hw/pci/pci.c                        | 35 +++++++++++-
include/hw/arm/virt.h               |  1 +
include/hw/pci/pci.h                |  1 +
include/hw/pci/pci_bus.h            | 13 +++++
7 files changed, 149 insertions(+), 24 deletions(-)
[RFC PATCH 0/4] hw/arm/virt-acpi-build: Introduce iommu option for pci root bus
Posted by Wang Xingang 3 years, 2 months ago
From: Xingang Wang <wangxingang5@huawei.com>

These patches add support for configure iommu on/off for pci root bus,
including primary bus and pxb root bus. At present, All root bus will go
through iommu when iommu is configured, which is not flexible.

So this add option to enable/disable iommu for primary bus and pxb root bus.
When iommu is enabled for the root bus, devices attached to it will go
through iommu. When iommu is disabled for the root bus, devices will not
go through iommu accordingly.

Xingang Wang (4):
  pci: Add PCI_BUS_IOMMU property
  hw/pci: Add iommu option for pci root bus
  hw/pci: Add pci_root_bus_max_bus
  hw/arm/virt-acpi-build: Add explicit idmap info in IORT table

 hw/arm/virt-acpi-build.c            | 88 +++++++++++++++++++++--------
 hw/arm/virt.c                       | 29 ++++++++++
 hw/pci-bridge/pci_expander_bridge.c |  6 ++
 hw/pci/pci.c                        | 35 +++++++++++-
 include/hw/arm/virt.h               |  1 +
 include/hw/pci/pci.h                |  1 +
 include/hw/pci/pci_bus.h            | 13 +++++
 7 files changed, 149 insertions(+), 24 deletions(-)

-- 
2.19.1


Re: [RFC PATCH 0/4] hw/arm/virt-acpi-build: Introduce iommu option for pci root bus
Posted by no-reply@patchew.org 3 years, 2 months ago
Patchew URL: https://patchew.org/QEMU/1614329353-2124-1-git-send-email-wangxingang5@huawei.com/



Hi,

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

Type: series
Message-id: 1614329353-2124-1-git-send-email-wangxingang5@huawei.com
Subject: [RFC PATCH 0/4] hw/arm/virt-acpi-build: Introduce iommu option for pci root bus

=== 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 ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
 * [new tag]         patchew/1614329353-2124-1-git-send-email-wangxingang5@huawei.com -> patchew/1614329353-2124-1-git-send-email-wangxingang5@huawei.com
Switched to a new branch 'test'
baed0b1 hw/arm/virt-acpi-build: Add explicit idmap info in IORT table
bf70832 hw/pci: Add pci_root_bus_max_bus
ddfb0cc hw/pci: Add iommu option for pci root bus
ab317df pci: Add PCI_BUS_IOMMU property

=== OUTPUT BEGIN ===
1/4 Checking commit ab317dff3b76 (pci: Add PCI_BUS_IOMMU property)
2/4 Checking commit ddfb0ccbed8b (hw/pci: Add iommu option for pci root bus)
ERROR: suspect code indent for conditional statements (4, 7)
#105: FILE: hw/pci-bridge/pci_expander_bridge.c:258:
+    if (pxb->iommu) {
+       bus->flags |= PCI_BUS_IOMMU;

total: 1 errors, 0 warnings, 98 lines checked

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

3/4 Checking commit bf70832f4742 (hw/pci: Add pci_root_bus_max_bus)
4/4 Checking commit baed0b179ccc (hw/arm/virt-acpi-build: Add explicit idmap info in IORT table)
ERROR: trailing statements should be on next line
#52: FILE: hw/arm/virt-acpi-build.c:269:
+        if (!pci_bus_is_root(bus)) continue;

ERROR: braces {} are necessary for all arms of this statement
#52: FILE: hw/arm/virt-acpi-build.c:269:
+        if (!pci_bus_is_root(bus)) continue;
[...]

ERROR: trailing statements should be on next line
#96: FILE: hw/arm/virt-acpi-build.c:328:
+            if (!pci_bus_has_iommu(bus)) continue;

ERROR: braces {} are necessary for all arms of this statement
#96: FILE: hw/arm/virt-acpi-build.c:328:
+            if (!pci_bus_has_iommu(bus)) continue;
[...]

total: 4 errors, 0 warnings, 139 lines checked

Patch 4/4 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/1614329353-2124-1-git-send-email-wangxingang5@huawei.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com