This patch series enhances how device IDs are handled in RISC-V IOMMU by leveraging memory attributes.
The BDF (Bus-Device-Function) is now included in memory attributes for DMA operations, ensuring accurate device identification. Since PCIe bus numbers can change after re-enumeration, relying on static device IDs in RISCVIOMMUSpace may lead to incorrect Device Directory Table walk. The IOMMU now dynamically retrieves latest device IDs from memory attributes. The bus property, previously used to set non-root endpoint bus numbers, is removed. As PCIe bus numbers are assigned at runtime and vary across endpoints, exposing a single property to pre-set them is unnecessary and incorrect. With device IDs now retrieved dynamically, this property is no longer required. Jason Chien (3): include/hw/pci: Attach BDF to Memory Attributes hw/riscv/riscv-iommu: Obtain Device IDs from Memory Attributes hw/riscv/riscv_iommu: Remove the "bus" property hw/riscv/riscv-iommu.c | 15 +++++++-------- hw/riscv/riscv-iommu.h | 1 - include/hw/pci/pci_device.h | 10 ++++++++-- 3 files changed, 15 insertions(+), 11 deletions(-) -- 2.43.2