AMD/IOMMU: free all-empty page tables
authorJan Beulich <jbeulich@suse.com>
Mon, 25 Jul 2022 13:40:00 +0000 (15:40 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 25 Jul 2022 13:40:00 +0000 (15:40 +0200)
commit2d1bb66d87c2bec712643593584821d056e3b97e
tree7e5c9bf0a26f5b4913273d8869ecf65df6630626
parenta81d9f9baa8a90db3f30d1f973addc30758a8068
AMD/IOMMU: free all-empty page tables

When a page table ends up with no present entries left, it can be
replaced by a non-present entry at the next higher level. The page table
itself can then be scheduled for freeing.

Note that while its output isn't used there yet,
pt_update_contig_markers() right away needs to be called in all places
where entries get updated, not just the one where entries get cleared.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Paul Durrant <paul@xen.org>
xen/drivers/passthrough/amd/iommu_map.c