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

2025-07-15 Thread Nicolin Chen via
On Mon, Jul 14, 2025 at 04:59:40PM +0100, Shameer Kolothum wrote: > From: Nicolin Chen > > Not all fields in the SMMU IDR registers are meaningful for userspace. > Only the following fields can be used: > >   - IDR0: ST_LEVEL, TERM_MODEL, STALL_MODEL, TTENDIAN, CD2L, ASID16, TTF   >   - IDR1: SI

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

2025-07-14 Thread Nicolin Chen via
On Mon, Jul 14, 2025 at 09:14:17AM -0700, Nicolin Chen wrote: > Hi Shameer, > > Thank you for sending the v3. > > On Mon, Jul 14, 2025 at 04:59:26PM +0100, Shameer Kolothum wrote: > > Branch for testing: > [...] > > Tested on a HiSilicon platform with multiple SMMUv3s. > > > > ./qemu-system-aarc

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

2025-07-14 Thread Nicolin Chen via
On Mon, Jul 14, 2025 at 01:04:02PM -0700, Nicolin Chen wrote: > On Mon, Jul 14, 2025 at 04:59:40PM +0100, Shameer Kolothum wrote: > > From: Nicolin Chen > > > > Not all fields in the SMMU IDR registers are meaningful for userspace. > > Only the following fields can be used: > > > >   - IDR0: ST_

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

2025-07-14 Thread Nicolin Chen via
On Mon, Jul 14, 2025 at 04:59:40PM +0100, Shameer Kolothum wrote: > From: Nicolin Chen > > Not all fields in the SMMU IDR registers are meaningful for userspace. > Only the following fields can be used: > >   - IDR0: ST_LEVEL, TERM_MODEL, STALL_MODEL, TTENDIAN, CD2L, ASID16, TTF   >   - IDR1: SI

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

2025-07-14 Thread Nicolin Chen via
On Mon, Jul 14, 2025 at 04:59:30PM +0100, Shameer Kolothum wrote: > Allows to retrieve the PCIIOMMUOps based on the SMMU type. This will be > useful when we add support for accelerated SMMUV3 in subsequent patches > as that requires a different set of callbacks for iommu ops. > > No special handli

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

2025-07-14 Thread Nicolin Chen via
Hi Shameer, Thank you for sending the v3. On Mon, Jul 14, 2025 at 04:59:26PM +0100, Shameer Kolothum wrote: > Branch for testing: [...] > Tested on a HiSilicon platform with multiple SMMUv3s. > > ./qemu-system-aarch64 \ >   -machine virt,accel=kvm,gic-version=3 \ >   -object iommufd,id=iommufd0

Re: [PATCH v2 3/4] vfio/iommufd: Implement [at|de]tach_hwpt handlers

2025-05-30 Thread Nicolin Chen via
On Fri, May 30, 2025 at 05:35:11PM +0800, Zhenzhong Duan wrote: > Implement [at|de]tach_hwpt handlers in VFIO subsystem. vIOMMU > utilizes them to attach to or detach from hwpt on host side. > > Signed-off-by: Yi Liu > Signed-off-by: Zhenzhong Duan > Reviewed-by: Cédric Le Goater Reviewed-by:

Re: [RFC PATCH v2 00/20] hw/arm/virt: Add support for user-creatable accelerated SMMUv3

2025-03-25 Thread Nicolin Chen via
On Tue, Mar 25, 2025 at 03:43:29PM +, Shameerali Kolothum Thodi wrote: > > For the record I tested the series with host VFIO device and a > > virtio-blk-pci device put behind the same pxb-pcie/smmu protection and > > it works just fine > > > > -+-[:0a]-+-01.0-[0b]00.0  Mellanox Technol

[PATCH RFCv1 01/10] hw/arm/virt-acpi-build: Add IORT RMR regions to handle MSI nested binding

2024-06-25 Thread Nicolin Chen via
From: Eric Auger To handle SMMUv3 nested stage support it is practical to expose the guest with reserved memory regions (RMRs) covering the IOVAs used by the host kernel to map physical MSI doorbells. Those IOVAs belong to [0x800, 0x810] matching MSI_IOVA_BASE and MSI_IOVA_LENGTH definit

[PATCH RFCv1 06/10] hw/arm/virt: Assign vfio-pci devices to nested SMMUs

2024-06-25 Thread Nicolin Chen via
With iommu=nested-smmuv3, there could be multiple nested SMMU instances in the vms. A passthrough device must to look up for its iommu handler in its sysfs node, and then link to the nested SMMU instance created for the same iommu handler. This isn't easy to do. Add an auto-assign piece after all

[PATCH RFCv1 09/10] hw/arm/virt-acpi-build: Build IORT with multiple SMMU nodes

2024-06-25 Thread Nicolin Chen via
There can be multiple PCI buses behind different SMMU nodes. And each pair should be associated in the IORT table too when building the ID mappings. Create multiple SMMU nodes if needed, store their offsets in an array. Signed-off-by: Nicolin Chen --- hw/arm/virt-acpi-build.c | 36 +