[RFC PATCH v3 14/15] Read and validate host SMMUv3 feature bits

2025-07-14 Thread Shameer Kolothum via
en Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3-accel.c | 103 ++ hw/arm/smmuv3-accel.h | 5 ++ hw/arm/smmuv3.c | 4 ++ hw/arm/trace-events | 2 +- 4 files changed, 113 insertions(+), 1 deletion(-) diff --git a/hw/arm/smmuv3-accel.c b/hw/

[RFC PATCH v3 11/15] hw/pci/pci: Introduce optional get_msi_address_space() callback.

2025-07-14 Thread Shameer Kolothum via
callback returns the IOMMU address space if the guest has set up S1 translations for the vfio-pci device. Otherwise, it returns the system address space. Suggested-by: Nicolin Chen Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3-accel.c | 25 + hw/pci/pci.c | 19

[RFC PATCH v3 13/15] hw/arm/smmuv3: Forward invalidation commands to hw

2025-07-14 Thread Shameer Kolothum via
From: Nicolin Chen Use the provided smmuv3-accel helper functions to issue the invalidation commands to host SMMUv3. Signed-off-by: Nicolin Chen Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3-internal.h | 11 +++ hw/arm/smmuv3.c | 28 2 files

[RFC PATCH v3 05/15] hw/arm/smmuv3-accel: Introduce smmuv3 accel device

2025-07-14 Thread Shameer Kolothum via
port is in place. Signed-off-by: Shameer Kolothum --- hw/arm/meson.build | 3 +- hw/arm/smmu-common.c | 6 +++- hw/arm/smmuv3-accel.c| 66 hw/arm/smmuv3-accel.h| 19 +++ include/hw/arm/smmu-common.h | 3 ++ 5 files c

[RFC PATCH v3 04/15] hw/arm/smmu-common: Introduce smmu_iommu_ops_by_type() helper

2025-07-14 Thread Shameer Kolothum via
functional changes intended. Signed-off-by: Shameer Kolothum --- hw/arm/smmu-common.c | 17 +++-- include/hw/arm/smmu-common.h | 1 + 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index 0f1a06cec2..3a1080773a

[RFC PATCH v3 03/15] hw/arm/smmu-common: Factor out common helper functions and export

2025-07-14 Thread Shameer Kolothum via
Subsequent patches for smmuv3 accel support will make use of this. Signed-off-by: Nicolin Chen Reviewed-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/smmu-common.c | 48 ++-- include/hw/arm/smmu-common.h | 6 + 2 files changed, 36

[RFC PATCH v3 00/15] hw/arm/virt: Add support for user-creatable accelerated SMMUv3

2025-07-14 Thread Shameer Kolothum via
ad and validate host SMMUv3 feature bits Shameer Kolothum (7): hw/arm/smmu-common: Factor out common helper functions and export hw/arm/smmu-common: Introduce smmu_iommu_ops_by_type() helper hw/arm/smmuv3-accel: Introduce smmuv3 accel device hw/arm/smmuv3-accel: Restrict accelerate

[RFC PATCH v3 12/15] hw/arm/smmuv3-accel: Introduce helpers to batch and issue cache invalidations

2025-07-14 Thread Shameer Kolothum via
From: Nicolin Chen Helpers will batch the commands and issue at once to host SMMUv3. Signed-off-by: Nicolin Chen Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3-accel.c| 65 hw/arm/smmuv3-accel.h| 16 ++ hw/arm/smmuv3-internal.h | 12

[RFC PATCH v3 15/15] hw/arm/smmu-common: Add accel property for SMMU dev

2025-07-14 Thread Shameer Kolothum via
Now user can set "accel=on". Have fun! Signed-off-by: Shameer Kolothum --- hw/arm/smmu-common.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index 6a58f574d3..3e8783670a 100644 --- a/hw/arm/smmu-common.c +++ b/hw/arm/smmu-common.c

[RFC PATCH v3 08/15] hw/arm/smmuv3-accel: Add set/unset_iommu_device callback

2025-07-14 Thread Shameer Kolothum via
dev to viommu device list Also add an unset_iommu_device to unwind/cleanup above. Signed-off-by: Nicolin Chen Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3-accel.c| 154 +++ hw/arm/smmuv3-accel.h| 20 + hw/arm/trace-events | 4

[RFC PATCH v3 09/15] hw/arm/smmuv3-accel: Support nested STE install/uninstall support

2025-07-14 Thread Shameer Kolothum via
Chen Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3-accel.c| 130 +++ hw/arm/smmuv3-accel.h| 17 + hw/arm/smmuv3-internal.h | 4 ++ hw/arm/smmuv3.c | 8 ++- hw/arm/trace-events | 1 + 5 files changed, 157 insertions(+), 3

[RFC PATCH v3 07/15] hw/arm/smmuv3: Implement get_viommu_cap() callback

2025-07-14 Thread Shameer Kolothum via
ge 1. Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3-accel.c | 15 +++ hw/arm/virt.c | 12 2 files changed, 27 insertions(+) diff --git a/hw/arm/smmuv3-accel.c b/hw/arm/smmuv3-accel.c index 0b0ddb03e2..66cd4f5ece 100644 --- a/hw/arm/smmuv3-accel.c +++ b/h

[RFC PATCH v3 10/15] hw/arm/smmuv3-accel: Allocate a vDEVICE object for device

2025-07-14 Thread Shameer Kolothum via
From: Nicolin Chen Allocate and associate a vDEVICE object for the Guest device with the vIOMMU. This will help the kernel to do the vSID --> sid translation whenever required (eg: device specific invalidations). Signed-off-by: Nicolin Chen Signed-off-by: Shameer Kolothum --- hw/arm/smm

[RFC PATCH v3 01/15] backends/iommufd: Introduce iommufd_backend_alloc_viommu

2025-07-14 Thread Shameer Kolothum via
From: Nicolin Chen Add a helper to allocate a viommu object. Signed-off-by: Nicolin Chen Reviewed-by: Eric Auger Signed-off-by: Shameer Kolothum --- backends/iommufd.c | 25 + backends/trace-events| 1 + include/system/iommufd.h | 4 3 files changed

[RFC PATCH v3 06/15] hw/arm/smmuv3-accel: Restrict accelerated SMMUv3 to vfio-pci endpoints with iommufd

2025-07-14 Thread Shameer Kolothum via
nabled, it must return the IOMMU address space for MSI. Support for this will be added in a follow-up patch. Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3-accel.c | 50 - hw/arm/smmuv3-accel.h | 15 + hw/arm/smmuv3.c

[RFC PATCH v3 02/15] backends/iommufd: Introduce iommufd_vdev_alloc

2025-07-14 Thread Shameer Kolothum via
From: Nicolin Chen Add a helper to allocate an iommufd device's virtual device (in the user space) per a viommu instance. Signed-off-by: Nicolin Chen Reviewed-by: Eric Auger Signed-off-by: Shameer Kolothum --- backends/iommufd.c | 26 ++ backends/trace-e

[PATCH v8 12/12] qtest/bios-tables-test: Update tables for smmuv3 tests

2025-07-11 Thread Shameer Kolothum via
Flags (decoded below) : Single Mapping : 0 Note: DSDT changes are not described here as it is not impacted by the way the SMMUv3 is instantiated. Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- tests/data/acpi/aar

[PATCH v8 09/12] qemu-options.hx: Document the arm-smmuv3 device

2025-07-11 Thread Shameer Kolothum via
Now that arm,virt can have user-creatable smmuv3 devices, document it. Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- qemu-options.hx | 7 +++ 1 file changed, 7 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx

[PATCH v8 06/12] hw/arm/virt: Add an SMMU_IO_LEN macro

2025-07-11 Thread Shameer Kolothum via
From: Nicolin Chen This is useful as the subsequent support for new SMMUv3 dev will also use the same. Signed-off-by: Nicolin Chen Reviewed-by: Donald Dutile Reviewed-by: Eric Auger Tested-by: Nathan Chen Reviewed-by: Jonathan Cameron Tested-by: Eric Auger Signed-off-by: Shameer Kolothum

[PATCH v8 05/12] hw/arm/virt: Factor out common SMMUV3 dt bindings code

2025-07-11 Thread Shameer Kolothum via
No functional changes intended. This will be useful when we add support for user-creatable smmuv3 device. Reviewed-by: Nicolin Chen Reviewed-by: Eric Auger Tested-by: Nathan Chen Reviewed-by: Jonathan Cameron Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 54

[PATCH v8 11/12] qtest/bios-tables-test: Add tests for legacy smmuv3 and smmuv3 device

2025-07-11 Thread Shameer Kolothum via
> {ITS} [all other ids] -> {ITS} Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- tests/qtest/bios-tables-test.c | 86 ++ 1 file changed, 86 insertions(+) diff --git a/tests/qtest/bios-tab

[PATCH v8 03/12] hw/arm/virt-acpi-build: Re-arrange SMMUv3 IORT build

2025-07-11 Thread Shameer Kolothum via
common code paths when we add that support. Tested-by: Nathan Chen Reviewed-by: Nicolin Chen Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 137 ++- hw/arm/virt.c

[PATCH v8 10/12] bios-tables-test: Allow for smmuv3 test data.

2025-07-11 Thread Shameer Kolothum via
The tests to be added exercise both legacy(iommu=smmuv3) and new -device arm-smmuv3,.. cases. Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- tests/data/acpi/aarch64/virt/DSDT.smmuv3-dev| 0 tests/data/acpi/aarch64/virt

[PATCH v8 00/12] hw/arm/virt: Add support for user creatable SMMUv3 device

2025-07-11 Thread Shameer Kolothum via
20230421165037.2506-1-jonathan.came...@huawei.com/ Nicolin Chen (1): hw/arm/virt: Add an SMMU_IO_LEN macro Shameer Kolothum (11): hw/arm/virt-acpi-build: Don't create ITS id mappings by default hw/arm/smmu-common: Check SMMU has PCIe Root Complex association hw/arm/virt-acpi-build: R

[PATCH v8 08/12] hw/arm/virt: Allow user-creatable SMMUv3 dev instantiation

2025-07-11 Thread Shameer Kolothum via
-by: Eric Auger Tested-by: Nathan Chen Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/smmu-common.c | 8 +- hw/arm/smmuv3.c | 2 ++ hw/arm/virt.c| 51 hw/core/sysbus-fdt.c | 3 +++ include

[PATCH v8 07/12] hw/pci: Introduce pci_setup_iommu_per_bus() for per-bus IOMMU ops retrieval

2025-07-11 Thread Shameer Kolothum via
pdate pci_device_get_iommu_bus_devfn() to use iommu_per_bus when determining the correct IOMMU ops, ensuring accurate behavior for per-bus IOMMUs. Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Tested-by: Nathan Chen Tested-by: Eric Auger Reviewed-by: Nicolin Chen Signed-off-by: Shameer Kol

[PATCH v8 02/12] hw/arm/smmu-common: Check SMMU has PCIe Root Complex association

2025-07-11 Thread Shameer Kolothum via
: Eric Auger Reviewed-by: Nicolin Chen Signed-off-by: Shameer Kolothum --- hw/arm/smmu-common.c| 31 ++--- hw/pci-bridge/pci_expander_bridge.c | 1 - include/hw/pci/pci_bridge.h | 1 + 3 files changed, 29 insertions(+), 4 deletions(-) diff --git

[PATCH v8 04/12] hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices

2025-07-11 Thread Shameer Kolothum via
Auger Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 64 1 file changed, 64 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 3c657704bf..9c48301a26 100644 --- a/hw/arm/virt-acpi

[PATCH v8 01/12] hw/arm/virt-acpi-build: Don't create ITS id mappings by default

2025-07-11 Thread Shameer Kolothum via
2 ("hw/arm/virt-acpi-build: Fix ACPI IORT and MADT tables when its=off") Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Reviewed-by: Donald Dutile Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 6 -- 1 file changed, 6 deletions(-) diff

[PATCH v7 08/12] hw/arm/virt: Allow user-creatable SMMUv3 dev instantiation

2025-07-08 Thread Shameer Kolothum via
-by: Eric Auger Tested-by: Nathan Chen Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/smmu-common.c | 8 +- hw/arm/smmuv3.c | 2 ++ hw/arm/virt.c| 51 hw/core/sysbus-fdt.c | 3 +++ include

[PATCH v7 10/12] bios-tables-test: Allow for smmuv3 test data.

2025-07-08 Thread Shameer Kolothum via
The tests to be added exercise both legacy(iommu=smmuv3) and new -device arm-smmuv3,.. cases. Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- tests/data/acpi/aarch64/virt/DSDT.smmuv3-dev| 0 tests/data/acpi/aarch64/virt

[PATCH v7 02/12] hw/arm/smmu-common: Check SMMU has PCIe Root Complex association

2025-07-08 Thread Shameer Kolothum via
: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/smmu-common.c| 29 ++--- hw/pci-bridge/pci_expander_bridge.c | 1 - include/hw/pci/pci_bridge.h | 1 + 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/hw/arm/smmu-common.c b

[PATCH v7 09/12] qemu-options.hx: Document the arm-smmuv3 device

2025-07-08 Thread Shameer Kolothum via
Now that arm,virt can have user-creatable smmuv3 devices, document it. Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- qemu-options.hx | 7 +++ 1 file changed, 7 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx

[PATCH v7 03/12] hw/arm/virt-acpi-build: Re-arrange SMMUv3 IORT build

2025-07-08 Thread Shameer Kolothum via
common code paths when we add that support. Tested-by: Nathan Chen Reviewed-by: Nicolin Chen Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 137 ++- hw/arm/virt.c

[PATCH v7 11/12] qtest/bios-tables-test: Add tests for legacy smmuv3 and smmuv3 device

2025-07-08 Thread Shameer Kolothum via
> {ITS} [all other ids] -> {ITS} Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- tests/qtest/bios-tables-test.c | 86 ++ 1 file changed, 86 insertions(+) diff --git a/tests/qtest/bios-tab

[PATCH v7 12/12] qtest/bios-tables-test: Update tables for smmuv3 tests

2025-07-08 Thread Shameer Kolothum via
Flags (decoded below) : Single Mapping : 0 Note: DSDT changes are not described here as it is not impacted by the way the SMMUv3 is instantiated. Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- tests/data/acpi/aar

[PATCH v7 01/12] hw/arm/virt-acpi-build: Don't create ITS id mappings by default

2025-07-08 Thread Shameer Kolothum via
2 ("hw/arm/virt-acpi-build: Fix ACPI IORT and MADT tables when its=off") Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Reviewed-by: Donald Dutile Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 6 -- 1 file changed, 6 deletions(-) diff

[PATCH v7 07/12] hw/pci: Introduce pci_setup_iommu_per_bus() for per-bus IOMMU ops retrieval

2025-07-08 Thread Shameer Kolothum via
pdate pci_device_get_iommu_bus_devfn() to use iommu_per_bus when determining the correct IOMMU ops, ensuring accurate behavior for per-bus IOMMUs. Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Tested-by: Nathan Chen Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/pci/

[PATCH v7 05/12] hw/arm/virt: Factor out common SMMUV3 dt bindings code

2025-07-08 Thread Shameer Kolothum via
No functional changes intended. This will be useful when we add support for user-creatable smmuv3 device. Reviewed-by: Nicolin Chen Reviewed-by: Eric Auger Tested-by: Nathan Chen Reviewed-by: Jonathan Cameron Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 54

[PATCH v7 06/12] hw/arm/virt: Add an SMMU_IO_LEN macro

2025-07-08 Thread Shameer Kolothum via
From: Nicolin Chen This is useful as the subsequent support for new SMMUv3 dev will also use the same. Signed-off-by: Nicolin Chen Reviewed-by: Donald Dutile Reviewed-by: Eric Auger Tested-by: Nathan Chen Reviewed-by: Jonathan Cameron Tested-by: Eric Auger Signed-off-by: Shameer Kolothum

[PATCH v7 00/12] hw/arm/virt: Add support for user creatable SMMUv3 device

2025-07-08 Thread Shameer Kolothum via
huawei.com/ [1]:https://lore.kernel.org/qemu-devel/20230421165037.2506-1-jonathan.came...@huawei.com/ Nicolin Chen (1): hw/arm/virt: Add an SMMU_IO_LEN macro Shameer Kolothum (11): hw/arm/virt-acpi-build: Don't create ITS id mappings by default hw/arm/smmu-common: Check SMMU has PCI

[PATCH v7 04/12] hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices

2025-07-08 Thread Shameer Kolothum via
Auger Tested-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 64 1 file changed, 64 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index cb11b316a2..d2a3914d91 100644 --- a/hw/arm/virt-acpi

[PATCH v6 04/12] hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices

2025-07-03 Thread Shameer Kolothum via
Auger Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 64 1 file changed, 64 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index cb11b316a2..d2a3914d91 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt

[PATCH v6 09/12] qemu-options.hx: Document the arm-smmuv3 device

2025-07-03 Thread Shameer Kolothum via
Now that arm,virt can have user-creatable smmuv3 devices, document it. Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Signed-off-by: Shameer Kolothum --- qemu-options.hx | 7 +++ 1 file changed, 7 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 1f862b19a6

[PATCH v6 12/12] qtest/bios-tables-test: Update tables for smmuv3 tests

2025-07-03 Thread Shameer Kolothum via
Flags (decoded below) : Single Mapping : 0 Note: DSDT changes are not described here as it is not impacted by the way the SMMUv3 is instantiated. Reviewed-by: Jonathan Cameron Signed-off-by: Shameer Kolothum --- tests/data/acpi/aarch64/virt/DSDT.smmuv3-dev| Bin 0 -> 10

[PATCH v6 06/12] hw/arm/virt: Add an SMMU_IO_LEN macro

2025-07-03 Thread Shameer Kolothum via
From: Nicolin Chen This is useful as the subsequent support for new SMMUv3 dev will also use the same. Signed-off-by: Nicolin Chen Reviewed-by: Donald Dutile Reviewed-by: Eric Auger Tested-by: Nathan Chen Reviewed-by: Jonathan Cameron Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 5

[PATCH v6 11/12] qtest/bios-tables-test: Add tests for legacy smmuv3 and smmuv3 device

2025-07-03 Thread Shameer Kolothum via
> {ITS} [all other ids] -> {ITS} Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Signed-off-by: Shameer Kolothum --- tests/qtest/bios-tables-test.c | 86 ++ 1 file changed, 86 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest

[PATCH v6 03/12] hw/arm/virt-acpi-build: Re-arrange SMMUv3 IORT build

2025-07-03 Thread Shameer Kolothum via
common code paths when we add that support. Tested-by: Nathan Chen Reviewed-by: Nicolin Chen Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 137 ++- hw/arm/virt.c| 1

[PATCH v6 07/12] hw/pci: Introduce pci_setup_iommu_per_bus() for per-bus IOMMU ops retrieval

2025-07-03 Thread Shameer Kolothum via
pdate pci_device_get_iommu_bus_devfn() to use iommu_per_bus when determining the correct IOMMU ops, ensuring accurate behavior for per-bus IOMMUs. Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Tested-by: Nathan Chen Signed-off-by: Shameer Kolothum --- Please refer cover letter for more detai

[PATCH v6 08/12] hw/arm/virt: Allow user-creatable SMMUv3 dev instantiation

2025-07-03 Thread Shameer Kolothum via
-by: Eric Auger Tested-by: Nathan Chen Signed-off-by: Shameer Kolothum --- hw/arm/smmu-common.c | 8 +- hw/arm/smmuv3.c | 2 ++ hw/arm/virt.c| 50 hw/core/sysbus-fdt.c | 3 +++ include/hw/arm/smmu-common.h

[PATCH v6 10/12] bios-tables-test: Allow for smmuv3 test data.

2025-07-03 Thread Shameer Kolothum via
The tests to be added exercise both legacy(iommu=smmuv3) and new -device arm-smmuv3,.. cases. Reviewed-by: Jonathan Cameron Reviewed-by: Eric Auger Signed-off-by: Shameer Kolothum --- tests/data/acpi/aarch64/virt/DSDT.smmuv3-dev| 0 tests/data/acpi/aarch64/virt/DSDT.smmuv3-legacy | 0

[PATCH v6 05/12] hw/arm/virt: Factor out common SMMUV3 dt bindings code

2025-07-03 Thread Shameer Kolothum via
No functional changes intended. This will be useful when we add support for user-creatable smmuv3 device. Reviewed-by: Nicolin Chen Reviewed-by: Eric Auger Tested-by: Nathan Chen Reviewed-by: Jonathan Cameron Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 54

[PATCH v6 02/12] hw/arm/smmu-common: Check SMMU has PCIe Root Complex association

2025-07-03 Thread Shameer Kolothum via
-by: Shameer Kolothum --- hw/arm/smmu-common.c| 29 ++--- hw/pci-bridge/pci_expander_bridge.c | 1 - include/hw/pci/pci_bridge.h | 1 + 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c

[PATCH v6 00/12] hw/arm/virt: Add support for user creatable SMMUv3 device

2025-07-03 Thread Shameer Kolothum via
el.org/qemu-devel/20250311141045.66620-1-shameerali.kolothum.th...@huawei.com/ [1]:https://lore.kernel.org/qemu-devel/20230421165037.2506-1-jonathan.came...@huawei.com/ Nicolin Chen (1): hw/arm/virt: Add an SMMU_IO_LEN macro Shameer Kolothum (11): hw/arm/virt-acpi-build: Don't create ITS id ma

[PATCH v6 01/12] hw/arm/virt-acpi-build: Don't create ITS id mappings by default

2025-07-03 Thread Shameer Kolothum via
2 ("hw/arm/virt-acpi-build: Fix ACPI IORT and MADT tables when its=off") Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index cd90c47976..724fad5ffa 100644 --- a/hw/a

[PATCH v5 03/11] hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices

2025-06-23 Thread Shameer Kolothum via
Auger Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 55 1 file changed, 55 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c index 28489cf59f..bde44624cf 100644 --- a/hw/arm/virt-acpi-build.c +++ b/hw/arm/virt

[PATCH v5 01/11] hw/arm/smmu-common: Check SMMU has PCIe Root Complex association

2025-06-23 Thread Shameer Kolothum via
We only allow default PCIe Root Complex(pcie.0) or pxb-pcie based extra root complexes to be associated with SMMU. Although this change does not affect functionality at present, it is required when we add support for user-creatable SMMUv3 devices in future patches. Signed-off-by: Shameer

[PATCH v5 02/11] hw/arm/virt-acpi-build: Re-arrange SMMUv3 IORT build

2025-06-23 Thread Shameer Kolothum via
common code paths when we add that support. Tested-by: Nathan Chen Reviewed-by: Nicolin Chen Reviewed-by: Jonathan Cameron Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 109 +++ hw/arm/virt.c| 1 + include/hw/arm/virt.h| 1

[PATCH v5 11/11] qtest/bios-tables-test: Update tables for smmuv3 tests

2025-06-23 Thread Shameer Kolothum via
Single Mapping : 0 Signed-off-by: Shameer Kolothum --- tests/data/acpi/aarch64/virt/DSDT.smmuv3-dev| Bin 0 -> 10162 bytes tests/data/acpi/aarch64/virt/DSDT.smmuv3-legacy | Bin 0 -> 10162 bytes tests/data/acpi/aarch64/virt/IORT.smmuv3-dev| Bin 0 -> 364 bytes tests/data/acpi/aar

[PATCH v5 04/11] hw/arm/virt: Factor out common SMMUV3 dt bindings code

2025-06-23 Thread Shameer Kolothum via
No functional changes intended. This will be useful when we add support for user-creatable smmuv3 device. Reviewed-by: Nicolin Chen Reviewed-by: Eric Auger Tested-by: Nathan Chen Reviewed-by: Jonathan Cameron Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 54

[PATCH v5 10/11] qtest/bios-tables-test: Add tests for legacy smmuv3 and smmuv3 device

2025-06-23 Thread Shameer Kolothum via
output references pointing to two different SMMUv3 nodes and the remaining ones to ITS. Signed-off-by: Shameer Kolothum --- tests/qtest/bios-tables-test.c | 86 ++ 1 file changed, 86 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios

[PATCH v5 09/11] bios-tables-test: Allow for smmuv3 test data.

2025-06-23 Thread Shameer Kolothum via
The tests to be added exercises both legacy(iommu=smmuv3) and new -device arm-smmuv3,.. cases. Signed-off-by: Shameer Kolothum --- tests/data/acpi/aarch64/virt/DSDT.smmuv3-dev| 0 tests/data/acpi/aarch64/virt/DSDT.smmuv3-legacy | 0 tests/data/acpi/aarch64/virt/IORT.smmuv3-dev| 0 tests

[PATCH v5 08/11] qemu-options.hx: Document the arm-smmuv3 device

2025-06-23 Thread Shameer Kolothum via
Now that arm,virt can have user-creatable smmuv3 devices, document it. Signed-off-by: Shameer Kolothum --- qemu-options.hx | 7 +++ 1 file changed, 7 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 7eb8e02b4b..7d1a12f7ef 100644 --- a/qemu-options.hx +++ b/qemu-options.hx

[PATCH v5 06/11] hw/pci: Introduce pci_setup_iommu_per_bus() for per-bus IOMMU ops retrieval

2025-06-23 Thread Shameer Kolothum via
urate behavior for per-bus IOMMUs. Signed-off-by: Shameer Kolothum --- Please refer cover letter for more details on the issue that this is trying to fix. --- hw/pci/pci.c | 25 + include/hw/pci/pci.h | 2 ++ include/hw/pci/pci_bus.h | 1 + 3 files change

[PATCH v5 05/11] hw/arm/virt: Add an SMMU_IO_LEN macro

2025-06-23 Thread Shameer Kolothum via
From: Nicolin Chen This is useful as the subsequent support for new SMMUv3 dev will also use the same. Signed-off-by: Nicolin Chen Reviewed-by: Donald Dutile Reviewed-by: Eric Auger Tested-by: Nathan Chen Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 5 - 1 file changed, 4

[PATCH v5 07/11] hw/arm/virt: Allow user-creatable SMMUv3 dev instantiation

2025-06-23 Thread Shameer Kolothum via
limitations in QEMU’s device tree support, specifically its inability to properly present pxb-pcie based root complexes and their devices, the device tree support for the new SMMUv3 device is limited to cases where it is attached to the default pcie.0 root complex. Signed-off-by: Shameer Kolothum

[PATCH v5 00/11] hw/arm/virt: Add support for user creatable SMMUv3 device

2025-06-23 Thread Shameer Kolothum via
m/ [1]:https://lore.kernel.org/qemu-devel/20230421165037.2506-1-jonathan.came...@huawei.com/ Nicolin Chen (1): hw/arm/virt: Add an SMMU_IO_LEN macro Shameer Kolothum (10): hw/arm/smmu-common: Check SMMU has PCIe Root Complex association hw/arm/virt-acpi-build: Re-arrange SMMUv3 IORT build

[PATCH v4 7/7] qemu-options.hx: Document the arm-smmuv3 device

2025-06-13 Thread Shameer Kolothum via
Now that arm,virt can have user-creatable smmuv3 devices, document it. Signed-off-by: Shameer Kolothum --- qemu-options.hx | 6 ++ 1 file changed, 6 insertions(+) diff --git a/qemu-options.hx b/qemu-options.hx index 7eb8e02b4b..3edbde45bb 100644 --- a/qemu-options.hx +++ b/qemu-options.hx

[PATCH v4 0/7] hw/arm/virt: Add support for user creatable SMMUv3 device

2025-06-13 Thread Shameer Kolothum via
rali.kolothum.th...@huawei.com/ [1]:https://lore.kernel.org/qemu-devel/20230421165037.2506-1-jonathan.came...@huawei.com/ Nicolin Chen (1): hw/arm/virt: Add an SMMU_IO_LEN macro Shameer Kolothum (6): hw/arm/smmu-common: Check SMMU has PCIe Root Complex association hw/arm/virt-acpi-build: Re-

[PATCH v4 6/7] hw/arm/virt: Allow user-creatable SMMUv3 dev instantiation

2025-06-13 Thread Shameer Kolothum via
Allow cold-plug of smmuv3 device to virt if there is no machine wide legacy smmuv3 or a virtio-iommu is specified. Device tree support for new smmuv3 dev is limited to the case where it is associated with the default pcie.0 RC. Tested-by: Nathan Chen Signed-off-by: Shameer Kolothum --- hw/arm

[PATCH v4 1/7] hw/arm/smmu-common: Check SMMU has PCIe Root Complex association

2025-06-13 Thread Shameer Kolothum via
Although this change does not affect functionality at present, it is required when we add support for user-creatable SMMUv3 devices in future patches. Tested-by: Nathan Chen Signed-off-by: Shameer Kolothum --- hw/arm/smmu-common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff

[PATCH v4 3/7] hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices

2025-06-13 Thread Shameer Kolothum via
:| | 0x - 0x00FF (from RC0) | | 0x0100 - 0x01FF (from RC1) | | 0x0200 - 0x (No SMMU) | ++ Tested-by: Nathan Chen Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 55

[PATCH v4 2/7] hw/arm/virt-acpi-build: Re-arrange SMMUv3 IORT build

2025-06-13 Thread Shameer Kolothum via
common code paths when we add that support. Tested-by: Nathan Chen Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 111 +++ hw/arm/virt.c| 1 + include/hw/arm/virt.h| 1 + 3 files changed, 79 insertions(+), 34 deletions

[PATCH v4 4/7] hw/arm/virt: Factor out common SMMUV3 dt bindings code

2025-06-13 Thread Shameer Kolothum via
No functional changes intended. This will be useful when we add support for user-creatable smmuv3 device. Reviewed-by: Nicolin Chen Reviewed-by: Eric Auger Tested-by: Nathan Chen Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 54 +++ 1

[PATCH v4 5/7] hw/arm/virt: Add an SMMU_IO_LEN macro

2025-06-13 Thread Shameer Kolothum via
From: Nicolin Chen This is useful as the subsequent support for new SMMUv3 dev will also use the same. Signed-off-by: Nicolin Chen Reviewed-by: Donald Dutile Reviewed-by: Eric Auger Tested-by: Nathan Chen Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 8 +--- 1 file changed, 5

[PATCH v3 6/6] hw/arm/virt: Allow user-creatable SMMUv3 dev instantiation

2025-06-02 Thread Shameer Kolothum via
Allow cold-plug of smmuv3 device to virt if there is no machine wide legacy smmuv3 or a virtio-iommu is specified. Device tree support for new smmuv3 dev is limited to the case where it is associated with the default pcie.0 RC. Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3.c | 2

[PATCH v3 1/6] hw/arm/smmuv3: Check SMMUv3 has PCIe Root Complex association

2025-06-02 Thread Shameer Kolothum via
Although this change does not affect functionality at present, it is required when we add support for user-creatable SMMUv3 devices in future patches. Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3

[PATCH v3 2/6] hw/arm/virt-acpi-build: Re-arrange SMMUv3 IORT build

2025-06-02 Thread Shameer Kolothum via
common code paths when we add that support. Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 112 +++ hw/arm/virt.c| 1 + include/hw/arm/virt.h| 1 + 3 files changed, 80 insertions(+), 34 deletions(-) diff --git a/hw/arm/virt

[PATCH v3 4/6] hw/arm/virt: Factor out common SMMUV3 dt bindings code

2025-06-02 Thread Shameer Kolothum via
No functional changes intended. This will be useful when we add support for user-creatable smmuv3 device. Reviewed-by: Nicolin Chen Reviewed-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 54 +++ 1 file changed, 29 insertions

[PATCH v3 5/6] hw/arm/virt: Add an SMMU_IO_LEN macro

2025-06-02 Thread Shameer Kolothum via
From: Nicolin Chen This is useful as the subsequent support for new SMMUv3 dev will also use the same. Signed-off-by: Nicolin Chen Reviewed-by: Donald Dutile Reviewed-by: Eric Auger Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions

[PATCH v3 3/6] hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices

2025-06-02 Thread Shameer Kolothum via
With the soon to be introduced user-creatable SMMUv3 devices for virt, it is possible to have multiple SMMUv3 devices associated with different PCIe root complexes. Update IORT nodes accordingly. Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 54

[PATCH v3 0/6] hw/arm/virt: Add support for user creatable SMMUv3 device

2025-06-02 Thread Shameer Kolothum via
r [0]:https://lore.kernel.org/qemu-devel/20250311141045.66620-1-shameerali.kolothum.th...@huawei.com/ [1]:https://lore.kernel.org/qemu-devel/20230421165037.2506-1-jonathan.came...@huawei.com/ Nicolin Chen (1): hw/arm/virt: Add an SMMU_IO_LEN macro Shameer Kolothum (5): hw/arm/smmuv3: Check SMMUv3

[PATCH] hw/arm/virt: Check bypass iommu is not set for iommu-map DT property

2025-06-02 Thread Shameer Kolothum via
default_bus_bypass_iommu tells us whether the bypass_iommu is set for the default PCIe root bus. Make sure we check that before adding the "iommu-map" DT property. Fixes: 6d7a85483a06 ("hw/arm/virt: Add default_bus_bypass_iommu machine option") Suggested-by: Eric Auger Si

[PATCH v2 3/6] hw/arm/virt: Factor out common SMMUV3 dt bindings code

2025-05-02 Thread Shameer Kolothum via
No functional changes intended. This will be useful when we add support for user-creatable smmuv3 device. Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 54 +++ 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/hw/arm/virt.c b

[PATCH v2 2/6] hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices

2025-05-02 Thread Shameer Kolothum via
With the soon to be introduced user-creatable SMMUv3 devices for virt, it is possible to have multiple SMMUv3 devices associated with different PCIe root complexes. Update IORT nodes accordingly. Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 162

[PATCH v2 6/6] hw/arm/smmuv3: Enable smmuv3 device creation

2025-05-02 Thread Shameer Kolothum via
Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 605de9b721..e13950b7c5 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -2022,6 +2022,7 @@ static void smmuv3_class_init(ObjectClass *klass, const

[PATCH v2 1/6] hw/arm/smmuv3: Add support to associate a PCIe RC

2025-05-02 Thread Shameer Kolothum via
Although this change does not affect functionality at present, it lays the groundwork for enabling user-created SMMUv3 devices in future patches Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3.c | 26 ++ hw/arm/virt.c | 3 ++- 2 files changed, 28 insertions(+), 1

[PATCH v2 4/6] hw/arm/virt: Add an SMMU_IO_LEN macro

2025-05-02 Thread Shameer Kolothum via
From: Nicolin Chen This is useful as the subsequent support for new SMMUv3 dev will also use the same. Signed-off-by: Nicolin Chen Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index

[PATCH v2 5/6] hw/arm/virt: Add support for smmuv3 device

2025-05-02 Thread Shameer Kolothum via
Allow cold-plug of smmuv3 device to virt if there is no machine wide legacy smmuv3 or a virtio-iommu is specified. Device tree support for new smmuv3 dev is limited to the case where it is associated with the default pcie.0 RC. Signed-off-by: Shameer Kolothum --- hw/arm/virt.c| 48

[PATCH v2 0/6] Add support for user creatable SMMUv3 device

2025-05-02 Thread Shameer Kolothum via
//lore.kernel.org/qemu-devel/20250311141045.66620-1-shameerali.kolothum.th...@huawei.com/ [1]:https://lore.kernel.org/qemu-devel/20230421165037.2506-1-jonathan.came...@huawei.com/ Nicolin Chen (1): hw/arm/virt: Add an SMMU_IO_LEN macro Shameer Kolothum (5): hw/arm/smmuv3: Add support to associate

[PATCH 4/5] hw/arm/virt: Add support for smmuv3 device

2025-04-15 Thread Shameer Kolothum via
s a legacy smmuv3 device. Signed-off-by: Shameer Kolothum --- ToDo: probably need to change virt <= 9.2 to 10.0 considering the Qemu cycle we are at now. --- hw/arm/virt.c | 54 +++ hw/core/sysbus-fdt.c | 3 +++ include/hw/arm/virt.h | 1 + 3

[PATCH 5/5] hw/arm/smmuv3: Enable smmuv3 device creation

2025-04-15 Thread Shameer Kolothum via
Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index e3b8e13ca3..572119e472 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c @@ -2026,6 +2026,7 @@ static void smmuv3_dev_class_init(ObjectClass *klass

[PATCH 2/5] hw/arm/virt-acpi-build: Update IORT for multiple smmuv3 devices

2025-04-15 Thread Shameer Kolothum via
With the soon to be introduced user-creatable SMMUv3 devices for virt, it is possible to have multiple SMMUv3 devices associated with different PCIe root complexes. Update IORT nodes accordingly. Signed-off-by: Shameer Kolothum --- hw/arm/virt-acpi-build.c | 119

[PATCH 0/5] Add support for user creatable SMMUv3 device

2025-04-15 Thread Shameer Kolothum via
. Thanks, Shameer [0]:https://lore.kernel.org/qemu-devel/20250311141045.66620-1-shameerali.kolothum.th...@huawei.com/ [1]:https://lore.kernel.org/qemu-devel/20230421165037.2506-1-jonathan.came...@huawei.com/ Shameer Kolothum (5): hw/arm/smmuv3: Introduce SMMUv3 device hw/arm/virt-acpi-build: Update IORT

[PATCH 1/5] hw/arm/smmuv3: Introduce SMMUv3 device

2025-04-15 Thread Shameer Kolothum via
Initial support to have a user-creatable SMMUv3 device associated with a PCIe root complex, -device arm-smmuv3-dev,bus=pcie.x Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3.c | 54 + include/hw/arm/smmuv3.h | 16 2 files changed

[PATCH 3/5] hw/arm/virt: Factor out common SMMUV3 dt bindings code

2025-04-15 Thread Shameer Kolothum via
No functional changes intended. This will be useful when we add support for user-creatable smmuv3 device. Signed-off-by: Shameer Kolothum --- hw/arm/virt.c | 55 +++ 1 file changed, 29 insertions(+), 26 deletions(-) diff --git a/hw/arm/virt.c b

[RFC PATCH v2 03/20] hw/arm/smmuv3-accel: Add initial infrastructure for smmuv3-accel device

2025-03-11 Thread Shameer Kolothum via
to provide this. Signed-off-by: Shameer Kolothum --- hw/arm/Kconfig| 5 hw/arm/meson.build| 1 + hw/arm/smmu-common.c | 1 + hw/arm/smmuv3-accel.c | 51 +++ include/hw/arm/smmu-common.h | 3 +++ include/hw/arm

[RFC PATCH v2 20/20] hw/arm/smmuv3-accel: Enable smmuv3-accel creation

2025-03-11 Thread Shameer Kolothum via
Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3-accel.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/smmuv3-accel.c b/hw/arm/smmuv3-accel.c index fb08e1d66b..812f8e358f 100644 --- a/hw/arm/smmuv3-accel.c +++ b/hw/arm/smmuv3-accel.c @@ -595,6 +595,7 @@ static void

[RFC PATCH v2 14/20] hw/arm/smmuv3: Install nested ste for CFGI_STE

2025-03-11 Thread Shameer Kolothum via
Make use of smmuv3_accel provided _install_nested_ste() for CFGI_STE. Signed-off-by: Shameer Kolothum --- hw/arm/smmuv3.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index ea63731d61..83159db1d4 100644 --- a/hw/arm/smmuv3.c +++ b/hw/arm/smmuv3.c

[RFC PATCH v2 18/20] hw/arm/smmu-common: Bypass emulated IOTLB for a accel SMMUv3

2025-03-11 Thread Shameer Kolothum via
lk through the guest-level IO page table. Signed-off-by: Nicolin Chen Signed-off-by: Shameer Kolothum --- hw/arm/smmu-common.c | 21 + 1 file changed, 21 insertions(+) diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index 9fd455baa0..fd10df8866 100644 --- a/h

  1   2   3   4   >