[PATCH 01/11] RISC-V: drivers/iommu: Add RISC-V IOMMU - Ziommu support.

Tomasz Jeznach tjeznach at rivosinc.com
Thu Jul 20 10:30:14 PDT 2023


On Thu, Jul 20, 2023 at 5:31 AM Baolu Lu <baolu.lu at linux.intel.com> wrote:
>
> On 2023/7/20 3:33, Tomasz Jeznach wrote:
> > +static void riscv_iommu_iotlb_sync_map(struct iommu_domain *iommu_domain,
> > +                                    unsigned long iova, size_t size)
> > +{
> > +     unsigned long end = iova + size - 1;
> > +     /*
> > +      * Given we don't know the page size used by this range, we assume the
> > +      * smallest page size to ensure all possible entries are flushed from
> > +      * the IOATC.
> > +      */
> > +     size_t pgsize = PAGE_SIZE;
> > +     riscv_iommu_flush_iotlb_range(iommu_domain, &iova, &end, &pgsize);
> > +}
>
> Does RISC-V IOMMU require to invalidate the TLB cache after new mappings
> are created?
>

No. Only on unmapping / permission change.
Thanks for pointing this out.

> Best regards,
> baolu

regards,
- Tomasz



More information about the linux-riscv mailing list