On 15/05/2023 11:30, Ayan Kumar Halder wrote:
AFAICT, this approach would be incorrect because we wouldn't take into
account any restriction from the SMMU susbystem (it may support less
than what the processor support).
By the restriction from SMMU subsystem, I think you mean
p2m_restrict_ipa_bits().
Yes.
As I can see, p2m_restrict_ipa_bits() gets invoked much later than
setup_virt_paging().
I am afraid this is not correct. If you look at setup.c, you will notice
that iommu_setup() is called before setup_virt_paging(). There is a
comment on top of the former call explaining the ordering.
Cheers,
--
Julien Grall