@@ -1621,26 +1621,6 @@ int domain_context_mapping_one(
if ( !seg && !rc )
rc = me_wifi_quirk(domain, bus, devfn, domid, pgd_maddr, mode);
- if ( rc && !(mode & MAP_ERROR_RECOVERY) )
- {
- if ( !prev_dom ||
- /*
- * Unmapping here means DEV_TYPE_PCI devices with RMRRs (if such
- * exist) would cause problems if such a region was actually
- * accessed.
- */
- (prev_dom == dom_io && !pdev) )
- ret = domain_context_unmap_one(domain, iommu, bus, devfn);
- else
- ret = domain_context_mapping_one(prev_dom, ctx, iommu, bus, devfn, pdev,
- prev_dom->domain_id,
- iommu_default_context(prev_dom)->arch.vtd.pgd_maddr,
- (mode & MAP_WITH_RMRR) |
- MAP_ERROR_RECOVERY) < 0;
-
- if ( !ret && pdev && pdev->devfn == devfn )
- check_cleanup_domid_map(domain, pdev, iommu);
- }
if ( prev_dom )
rcu_unlock_domain(prev_dom);
@@ -28,8 +28,7 @@
*/
#define MAP_WITH_RMRR (1u << 0)
#define MAP_OWNER_DYING (1u << 1)
-#define MAP_ERROR_RECOVERY (1u << 2)
-#define UNMAP_ME_PHANTOM_FUNC (1u << 3)
+#define UNMAP_ME_PHANTOM_FUNC (1u << 2)
/* Allow for both IOAPIC and IOSAPIC. */
#define IO_xAPIC_route_entry IO_APIC_route_entry
This logic is almost never called as the only possible failures are - no memory to allocate the pagetable (if it isn't already allocated) this is fixed in this patch serie by ensuring that the pagetable is allocated when entering this function - EILSEQ when there is a race condtion with hardware, which should not happen under normal circonstances Remove this logic to simplify the error management of the function. Signed-off-by: Teddy Astie <teddy.astie@vates.tech> --- xen/drivers/passthrough/vtd/iommu.c | 20 -------------------- xen/drivers/passthrough/vtd/vtd.h | 3 +-- 2 files changed, 1 insertion(+), 22 deletions(-)