Closed rock-ifly closed 1 month ago
It's not possible to guarantee mtt_pagesize >= pte_pagesize
. Supervisor software is allowed to map memory that it cannot access, or can only partially access. If hardware wants to use the same structure to cache page table walks and MTT walks, it is responsible for splitting entries to the appropriate granularity.
Take for example the hosting supervisor domain in a CoVE environment. It is running Linux, which uses large (2M/1G) pages for its direct map of DRAM. Say it allocates a 4k page of DRAM to a CoVE TVM. The RDSM will modify the MTT to deny access to that 4k page from the hosting supervisor domain, which may require splitting a larger region in the MTT. But the page table in Linux will not change, and will still have a 2M/1G page.
@SiFiveHolland is exactly right - there is no architectural relationship between page sizes in 1st (or G-stage) page sizes and the MTT page sizes. The hardware managing the caches (and if any combined TLBs implemented) are responsible for splitting entries to the appropriate granularity when there is a big->small fracturing required. Also this is an important aspect of Smmtt that the MTT can overlay access restrictions on the mappings created by the supervisor domain kernel but cannot expand permissions. Similarly for any small->big page size conversions, it is upto the SW implementations to be able to optimize their use of caches and any TLB implementations.
presuming ok to close this issue @rock-ifly
ok,there is no architectural relationship between the two size.
Thanks you very much. @SiFiveHolland @rsahita
Is there any relationship between mtt pagesize and pte pagesize?