On 3/6/26 14:44, Eric Auger wrote:
Currently it is possible to attach several arm-smmuv3 devices to the same bus although it is a wrong setup.Change the prototype of pci_setup_iommu_per_bus to pass an error handle. This latter is set when iommu_per_bus is already set and used by the single caller (smmu_base_realize) to report a useful error to the end-user. While at it document pci_setup_iommu_per_bus callback in the header. Fixes: 66d2f665e163 ("hw/arm/virt: Allow user-creatable SMMUv3 dev instantiation") Signed-off-by: Eric Auger <[email protected]> Tested-by: Nathan Chen <[email protected]> Reviewed-by: Shameer Kolothum <[email protected]> Reviewed-by: Nicolin Chen <[email protected]> --- v1 -> v2: - in smmu_base_realize, return if pci_setup_iommu_per_bus returns false (Philippe) --- include/hw/pci/pci.h | 16 +++++++++++++++- hw/arm/smmu-common.c | 4 +++- hw/pci/pci.c | 9 +++++++-- 3 files changed, 25 insertions(+), 4 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
