lkml.org 
[lkml]   [2023]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 01/11] RISC-V: drivers/iommu: Add RISC-V IOMMU - Ziommu support.
From
On 2023/7/20 3:33, Tomasz Jeznach wrote:
> +struct riscv_iommu_domain {
> + struct iommu_domain domain;
> +
> + struct list_head endpoints;
> + struct mutex lock;
> + struct riscv_iommu_device *iommu;

How are domains and iommu devices connected? A domain can be attached to
multiple devices, which are possibly behind different iommu devices. So
a domain is possibly connected to multiple iommu devices.

Is it possible?

> +
> + unsigned mode; /* RIO_ATP_MODE_* enum */
> + unsigned pscid; /* RISC-V IOMMU PSCID */
> +
> + pgd_t *pgd_root; /* page table root pointer */
> +};
> +
> +/* Private dev_iommu_priv object, device-domain relationship. */
> +struct riscv_iommu_endpoint {
> + struct device *dev; /* platform or PCI endpoint device */
> + unsigned devid; /* PCI bus:device:function number */
> + unsigned domid; /* PCI domain number, segment */
> + struct rb_node node; /* device tracking node (lookup by devid) */
> + struct riscv_iommu_device *iommu; /* parent iommu device */
> +
> + struct mutex lock;
> + struct list_head domain; /* endpoint attached managed domain */
> +};

Best regards,
baolu

\
 
 \ /
  Last update: 2023-07-20 12:39    [W:0.319 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site