AMD/IOMMU: don't needlessly trigger errors/crashes when unmapping a page
authorJan Beulich <jbeulich@suse.com>
Tue, 12 Nov 2019 10:08:34 +0000 (11:08 +0100)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Nov 2019 10:08:34 +0000 (11:08 +0100)
commitad591454f069647c36a7daaa9ec23384c0263f0b
treebdbe900f387e64bc3f3e419cccf983dfe501a0fe
parentdedcb1087dfeae0bbd9eea465a57f25b13e40585
AMD/IOMMU: don't needlessly trigger errors/crashes when unmapping a page

Unmapping a page which has never been mapped should be a no-op (note how
it already is in case there was no root page table allocated). There's
in particular no need to grow the number of page table levels in use,
and there's also no need to allocate intermediate page tables except
when needing to split a large page.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Paul Durrant <paul@xen.org>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Juergen Gross <jgross@suse.com>
xen/drivers/passthrough/amd/iommu_map.c