[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 +