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

From: Tomasz Jeznach
Date: Wed Jul 19 2023 - 17:44:06 EST


On Wed, Jul 19, 2023 at 1:50 PM Conor Dooley <conor@xxxxxxxxxx> wrote:
>
> Hey Tomasz,
>
> On Wed, Jul 19, 2023 at 12:33:45PM -0700, Tomasz Jeznach wrote:
> > The patch introduces skeleton IOMMU device driver implementation as defined
>
> This commit message reads like a cover letter IMO. At whatever point
> you send a v2, could you re-write this focusing on what is done in the
> patch itself?
>

ack. will amend the commit message.


> Also, since I am not going to reply to any of these iommu driver patches
> in a meaningful capacity, please run checkpatch.pl on your work. There
> are well over 100 style etc complaints that it has highlighted. Sparse
> has also gone a bit nuts, with many warnings along the lines of:
> drivers/iommu/riscv/iommu.c:1568:29: warning: incorrect type in assignment (different base types)
> drivers/iommu/riscv/iommu.c:1568:29: expected unsigned long long [usertype] iohgatp
> drivers/iommu/riscv/iommu.c:1568:29: got restricted __le64 [usertype]
>
> I can provide you the full list when the patchwork automation has run
> through the series.
>

Thank you, a list of used lint checkers definitely would help.


> Anyway, what I wanted to ask was whether it was valid to use the IOMMU
> in a system if Ziommu is not present in whatever the ISA extension
> communication mechanism is? Eg, riscv,isa or the ISA string property in
> the ACPI tables.
>

Yes, this has been pointed out to me already. As far as I can recall,
there was a discussion
at some point to introduce those as Ziommu extensions, later agreeing
not to call IOMMU
using ISA string conventions. Will remove remaining occurrences of
Ziommu from the series.


> Thanks,
> Conor.
>
> > References:
> > - [1] https://github.com/riscv-non-isa/riscv-iommu
> > - [2] https://github.com/tjeznach/linux/tree/tjeznach/riscv-iommu
> > - [3] https://github.com/tjeznach/qemu/tree/tjeznach/riscv-iommu
>
> FYI, we have the Link: tag/trailer for this.
>


Thanks,
- Tomasz