[RFC PATCH v4 10/10] iommu/riscv: Add IOTINVAL.GVMA after updating DDT/PDT entries
fangyu.yu at linux.alibaba.com
fangyu.yu at linux.alibaba.com
Mon Oct 19 18:24:03 PDT 2026
>Hi Fangyu,
>
>I wonder if riscv_iommu_iodir_set_mode() also needs a global
>IOTINVAL.GVMA now that second-stage translations are supported.
>
>It currently issues IODIR.INVAL_DDT and IOTINVAL.VMA after updating
>DDTP, but cached G-stage translations may still remain, for example
>when the IOMMU is reinitialized after a previous kernel used
>second-stage domains.
>
>Would a global IOTINVAL.GVMA (GV=0) be needed here as well?
>
Good catch.
Per the spec, adding an IOTINVAL.GVMA here is more accurate when
second-stage translation is enabled.
I'll add an IOTINVAL.GVMA in set_mode() in the next version.
Thanks,
Fangyu
>Thanks,
>Tan Chi
>
More information about the linux-riscv
mailing list