IOMMU/x86: support freeing of pagetables
authorJan Beulich <jbeulich@suse.com>
Mon, 25 Jul 2022 13:33:34 +0000 (15:33 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 25 Jul 2022 13:33:34 +0000 (15:33 +0200)
commit5a991ad8a5caec0f085c1a8d931b67faff498868
tree4638a24167cd838d3fe47d7bb7a56608ef07b06a
parentc1e1564c8995d8a08891bd9313e4289bbe4662b4
IOMMU/x86: support freeing of pagetables

For vendor specific code to support superpages we need to be able to
deal with a superpage mapping replacing an intermediate page table (or
hierarchy thereof). Consequently an iommu_alloc_pgtable() counterpart is
needed to free individual page tables while a domain is still alive.
Since the freeing needs to be deferred until after a suitable IOTLB
flush was performed, released page tables get queued for processing by a
tasklet.

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/arch/x86/include/asm/iommu.h
xen/drivers/passthrough/x86/iommu.c