On Fri, Dec 10, 2021 at 01:59:02PM +0100, Jan Beulich wrote: > On 10.12.2021 13:05, Roger Pau Monné wrote: > > On Fri, Sep 24, 2021 at 11:51:40AM +0200, Jan Beulich wrote: > >> In order to free intermediate page tables when replacing smaller > >> mappings by a single larger one callers will need to know the full PTE. > >> Flush indicators can be derived from this in the callers (and outside > >> the locked regions). First split set_iommu_pte_present() from > >> set_iommu_ptes_present(): Only the former needs to return the old PTE, > >> while the latter (like also set_iommu_pde_present()) doesn't even need > >> to return flush indicators. Then change return types/values and callers > >> accordingly. > > > > Without looking at further patches I would say you only care to know > > whether the old PTE was present (ie: pr bit set), at which point those > > functions could also return a boolean instead of a full PTE? > > But looking at further patches will reveal that I then also need the > next_level field from the old PTE (to tell superpages from page tables).
Oh, OK. I was expecting something like that. Reviewed-by: Roger Pau Monné <roger....@citrix.com> I wouldn't mind if you added a note to the commit message that the full PTE is returned because new callers will require more data. Thanks, Roger.