Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp357222pxj; Wed, 16 Jun 2021 04:10:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx92rH0DXj33/qR3AxkHHkL1n7hN0+DnRdQ9JRI6WXgjKjFWOHr91UO6WH76/Pag1Nge0wC X-Received: by 2002:a05:6402:1801:: with SMTP id g1mr3466491edy.305.1623841828353; Wed, 16 Jun 2021 04:10:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623841828; cv=none; d=google.com; s=arc-20160816; b=lmtWa0RVt61ExZV7TsnFd4Bhsc6Y8DWJXdAfh3fmYx2kqkPDscOIPscqaxHFPen/GC eFhU/bQ+dquG65cMUYMPsDriN4Pkw+/Y/XaqyeEIxlp2rnBKJA8micDb2yFAZ6UuwJvm sI0AsYHewGx/c6J+vmgYyEZAOKGzCm/DwuZMh3lZeOd56286ZOuQthYPxvdZilYrzhdn aC/IIT88HK4xyIdCiRF5TNQcFshUoO4aXfihjyQK6sd0VVIo+WWw4rC8yZbOoIVS88Ur pb4WYN8xaAURslUW2SsVER+bH6mbP6+OM7c7+30vtUQQpNDChtl/BBcVI0gDroSX4uaA G2og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=fQxhl8mYQLxXalVUbV1b5zmVeO6QUjPm56xE+/2DFvQ=; b=gFDlycqK8UcDMqIXC+sX4pbeWX5f6/Qqnozy5eO6bXs+S7Scdkbq3l0zVKatPwoT1Z +AChLrDSMMbVBWZtCTw8rln5eLDt+Hd7n2rzmtrYXj8AAczXtHfq+X67C6GwS5FoI7FV UJ/tUIljVJWW1bgA3zbHno6uQPm4lzoQy6NFa2qX4nClV1fBs8aHHkKOFAwInKUcVmOX 4vVIEyhamJtFsJWLN19T2yQ2KU5bs4BHwRMlrmADiAo94GLHzlVbqAsD7aka+8V53kdN 0aNHpd7eQs2WXb2HmcCfOXSFRrtoyA1vbYGV7TJOhszdZvp7VRky1W8X+h9C0nZlPRXh OKaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id og24si1192944ejc.490.2021.06.16.04.10.06; Wed, 16 Jun 2021 04:10:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231618AbhFPLKv (ORCPT + 99 others); Wed, 16 Jun 2021 07:10:51 -0400 Received: from frasgout.his.huawei.com ([185.176.79.56]:3243 "EHLO frasgout.his.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229713AbhFPLKp (ORCPT ); Wed, 16 Jun 2021 07:10:45 -0400 Received: from fraeml744-chm.china.huawei.com (unknown [172.18.147.226]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4G4htB0Qggz6JBC9; Wed, 16 Jun 2021 18:55:30 +0800 (CST) Received: from lhreml724-chm.china.huawei.com (10.201.108.75) by fraeml744-chm.china.huawei.com (10.206.15.225) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 16 Jun 2021 13:08:37 +0200 Received: from localhost.localdomain (10.69.192.58) by lhreml724-chm.china.huawei.com (10.201.108.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Wed, 16 Jun 2021 12:08:33 +0100 From: John Garry To: , , , , , CC: , , , , , , John Garry Subject: [PATCH v13 0/6] iommu: Enhance IOMMU default DMA mode build options Date: Wed, 16 Jun 2021 19:03:51 +0800 Message-ID: <1623841437-211832-1-git-send-email-john.garry@huawei.com> X-Mailer: git-send-email 2.8.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.58] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To lhreml724-chm.china.huawei.com (10.201.108.75) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a reboot of Zhen Lei's series from a couple of years ago, which never made it across the line. I still think that it has some value, so taking up the mantle. Motivation: Allow lazy mode be default mode for DMA domains for all ARCHs, and not only those who hardcode it (to be lazy). For ARM64, currently we must use a kernel command line parameter to use lazy mode, which is less than ideal. I have now included the print for strict/lazy mode, which I originally sent in: https://lore.kernel.org/linux-iommu/72eb3de9-1d1c-ae46-c5a9-95f26525d435@huawei.com/ There was some concern there about drivers and their custom prints conflicting with the print in that patch, but I think that it should be ok. Differences to v12: - Rebase to next-20210611 and include patch "iommu: Update "iommu.strict" documentation" as a baseline - Add Robin's RB tags (thanks!) - Please let me know if not ok with kernel-parameters.txt update in 3/6 - Add a patch to mark x86 strict cmdline params as deprecated - Improve wording in Kconfig change and tweak iommu_dma_strict declaration Differences to v11: - Rebase to next-20210610 - Drop strict mode globals in Intel and AMD drivers - Include patch to print strict vs lazy mode - Include patch to remove argument from iommu_set_dma_strict() Differences to v10: - Rebase to v5.13-rc4 - Correct comment and typo in Kconfig (Randy) - Make Kconfig choice depend on relevant architectures - Update kernel-parameters.txt for CONFIG_IOMMU_DEFAULT_{LAZY,STRICT} John Garry (3): iommu: Deprecate Intel and AMD cmdline methods to enable strict mode iommu: Print strict or lazy mode at init time iommu: Remove mode argument from iommu_set_dma_strict() Zhen Lei (3): iommu: Enhance IOMMU default DMA mode build options iommu/vt-d: Add support for IOMMU default DMA mode build options iommu/amd: Add support for IOMMU default DMA mode build options .../admin-guide/kernel-parameters.txt | 8 ++-- drivers/iommu/Kconfig | 41 +++++++++++++++++++ drivers/iommu/amd/amd_iommu_types.h | 6 --- drivers/iommu/amd/init.c | 7 ++-- drivers/iommu/amd/iommu.c | 6 --- drivers/iommu/intel/iommu.c | 16 ++++---- drivers/iommu/iommu.c | 12 ++++-- include/linux/iommu.h | 2 +- 8 files changed, 66 insertions(+), 32 deletions(-) -- 2.26.2