[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 07/11] x86: remove the IOMMU table infrastructure
- To: Christoph Hellwig <hch@xxxxxx>
- From: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
- Date: Tue, 1 Mar 2022 13:20:22 -0500
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=uolvxQacXYmhg6H3oD0H5MVWhM/QphFrFeGOHREHM6k=; b=ABUYj9cyWP8PCp2htP2NAZDrB/GO3uGXY6dKkHOdbPsf2gK99sCcHHyLLCkve+HYysqKYNyLXXlQo3bKdGNzN5nEcp40VIAR+KK1dPClJhay9/gqacJ7WwQgmGLNh0ulo1aoKzGirOmpJYYiFg8TKvYshXPQSH+lXlKp/zHJ5zgfjybFpm5rdtm+Fg5SoaI4Va30VtCH07mQQlrmWo6+WYNkJBWS5fIiI7pCnT6eWip0I8Q+nTR6C0dDI9t64JVkjY50PO+KDa6B8jtUwaftHqLhtC+JTVCxXot7f3PRu1bHkJ+d9GtFF+FVrNuMPvd5xl+eyXgeYMOU2jqALFCuBw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RTEkQ3+VW0KrT7/MofZKpdMQUN7WPAk3KY0OKVReLptjXfFUjz4TuQPnLxJVvDyHU1vzmfsejbdWUWz8yDRg5Aau4gwceJBdr4x2Hb2AAUtJmfA7eeLHnH5HWvIoaWir+GQKlWo3QAz+X6hQP+T3090iV94KG0gKdLnb91kUaS+iP+XP92LyWc1BnDmOBAbZo/0FmyxtMOD+Buk2jKrsTEB08+1medsg82zY3m+r4SrTYRJpth/OCjchimLOS7VXsMqmbXBo5R2qO+jHpCrVpQZ3ZGXotDuCdl6ZXMEqvX8BRRvwHyOZtgbQT6m7gBE/Ox180bqdSNEJPj2qPF0nyA==
- Cc: iommu@xxxxxxxxxxxxxxxxxxxxxxxxxx, x86@xxxxxxxxxx, Anshuman Khandual <anshuman.khandual@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Joerg Roedel <joro@xxxxxxxxxx>, David Woodhouse <dwmw2@xxxxxxxxxxxxx>, Lu Baolu <baolu.lu@xxxxxxxxxxxxxxx>, Robin Murphy <robin.murphy@xxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-hyperv@xxxxxxxxxxxxxxx, tboot-devel@xxxxxxxxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx
- Delivery-date: Tue, 01 Mar 2022 18:21:24 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
> -#include <asm/swiotlb.h>
> -
> -/*
> - * History lesson:
> - * The execution chain of IOMMUs in 2.6.36 looks as so:
> - *
> - * [xen-swiotlb]
> - * |
> - * +----[swiotlb *]--+
> - * / | \
> - * / | \
> - * [GART] [Calgary] [Intel VT-d]
> - * /
> - * /
> - * [AMD-Vi]
.. snip..
> - *
> void __init pci_iommu_alloc(void)
> {
> - struct iommu_table_entry *p;
> -
> - sort_iommu_table(__iommu_table, __iommu_table_end);
> - check_iommu_entries(__iommu_table, __iommu_table_end);
> -
> - for (p = __iommu_table; p < __iommu_table_end; p++) {
> - if (p && p->detect && p->detect() > 0) {
> - p->flags |= IOMMU_DETECTED;
> - if (p->early_init)
> - p->early_init();
> - if (p->flags & IOMMU_FINISH_IF_DETECTED)
> - break;
> - }
> + if (xen_pv_domain()) {
> + pci_xen_swiotlb_init();
> + return;
> }
> + pci_swiotlb_detect_4gb();
I think you also need to check for IBM Calgary?
> + gart_iommu_hole_init();
> + amd_iommu_detect();
> + detect_intel_iommu();
> + if (x86_swiotlb_enable)
> + swiotlb_init(0);
|