qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Enhancing Device Identification in RISC-V IOMMU Using Memory Attributes
@ 2025-03-02  9:12 Jason Chien
  2025-03-02  9:12 ` [PATCH 1/3] include/hw/pci: Attach BDF to " Jason Chien
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Jason Chien @ 2025-03-02  9:12 UTC (permalink / raw)
  To: qemu-devel, qemu-riscv
  Cc: Palmer Dabbelt, Alistair Francis, Weiwei Li,
	Daniel Henrique Barboza, Liu Zhiwei, Michael S. Tsirkin,
	Marcel Apfelbaum, Jason Chien

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



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2025-04-24  7:58 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-02  9:12 [PATCH 0/3] Enhancing Device Identification in RISC-V IOMMU Using Memory Attributes Jason Chien
2025-03-02  9:12 ` [PATCH 1/3] include/hw/pci: Attach BDF to " Jason Chien
2025-03-07 12:39   ` Daniel Henrique Barboza
2025-03-12 16:59     ` Jason Chien
2025-03-19 16:40       ` Jason Chien
2025-04-14 15:10         ` Jason Chien
2025-04-14 15:28   ` Michael S. Tsirkin
2025-04-24  7:57     ` Jason Chien
2025-03-02  9:12 ` [PATCH 2/3] hw/riscv/riscv-iommu: Obtain Device IDs from " Jason Chien
2025-03-07 12:35   ` Daniel Henrique Barboza
2025-03-02  9:12 ` [PATCH 3/3] hw/riscv/riscv_iommu: Remove the "bus" property Jason Chien
2025-03-07 12:36   ` Daniel Henrique Barboza
2025-04-04  1:43   ` Alistair Francis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).