From patchwork Wed Jul 19 09:33:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 9850895 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6F8E9602C8 for ; Wed, 19 Jul 2017 09:35:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B4D22858B for ; Wed, 19 Jul 2017 09:35:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3EC9A285A8; Wed, 19 Jul 2017 09:35:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D009F2858B for ; Wed, 19 Jul 2017 09:35:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=bkyqia9lrdBdJySWJ299x0SQ4H6vFZc9MWNpATHn6C8=; b=t7HjS+pvaI1ckzzwE8/gzWuyiu 4nA9vq3LFXHDOPLn3URhv5EUV8nZrttXow4Fo09EnCFEa+Yh4MLZgs4rFHdEXdKd92DhuIjY0lbeV cdGnnCoJ1e4T6rQhhGTC9e0dt5aa1HAzPcHeY+fxwW7xQCcsOFQS3By8P1e1KCU6Z5Le0fXSTHcXl Ly9pud1xNj5LnwU4aMo/TXJMAtomFXoVswiF7TGz+alPIKTm4qXyafPzoGJ9MUBNuDFV0dfwDdjnu WjnBu2MDORhdbyrOTr0RNh54N1XoGRNHnhOhRH6P3Fo/Kx7i8+A7miQ+J1vs1NedlMQXQlBrdxFWq mNGJaDkA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dXlOA-0002xe-DK; Wed, 19 Jul 2017 09:35:26 +0000 Received: from mail-wr0-x232.google.com ([2a00:1450:400c:c0c::232]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dXlNu-0001SU-UM for linux-arm-kernel@lists.infradead.org; Wed, 19 Jul 2017 09:35:14 +0000 Received: by mail-wr0-x232.google.com with SMTP id k71so2813333wrc.2 for ; Wed, 19 Jul 2017 02:34:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=BOlX+DcDQXlezNwkqOxNn0oqdcVnNDR253NJn+pkVPo=; b=IVpqdGQ9SGzpSJiDwEhIiXCdS0C4qa/rm0PBHzaO93gM6sGOdCpRYcx0I66aNuYUXA 1C7/GAZZNO8kH4QObRWfzF/zpYopc+9NvICT9fVeFCNwUkSd0YsBtQDgSBnLvuj3Whw3 70xD3qLhumWPs498mES06hpig6BDT3Dc4IHss= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=BOlX+DcDQXlezNwkqOxNn0oqdcVnNDR253NJn+pkVPo=; b=iCGUhkoCJWMmWBrFk+HXm3JS+mo91SoOcOVwOhk4el/zU3PBCsFu2gZL00XxxAIPcw yqr7xgDWe/oy8B7Ias9R73e3bwRFKNwolUFPfpK3H5Sgra24G+s0SLmWGQbU0C+tkgsL txrqUmBAOMRMlhjcF+f9eNcJ02stS+5dXvXtUyLIArdZA1nGyoBnyC/w39c23BDMnw/d khukVP4w8/Uk+rqPnXvVOcUlTEE0tqKYIRP8Qec2QkMZ7LqIo0kr4qBpsuKjCQrTFkFA jyhAeRMCqpYDCMI3SIrcxMKlf6kFw4LJy6SKcmzVyT2bw2AvaabwZ6nTavv10b0C9Y0M k+HA== X-Gm-Message-State: AIVw113kUEbgxIjTHknE60G9trwlOX//xVuktq+4CuBRpk6pXdKkUOgj dXeOBsnJf6wg/mcZ X-Received: by 10.223.133.99 with SMTP id 90mr3678152wrh.44.1500456888154; Wed, 19 Jul 2017 02:34:48 -0700 (PDT) Received: from anup-HP-Compaq-8100-Elite-CMT-PC.dhcp.avagotech.net ([192.19.237.250]) by smtp.gmail.com with ESMTPSA id y12sm8227473wrb.39.2017.07.19.02.34.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 19 Jul 2017 02:34:47 -0700 (PDT) From: Anup Patel To: Will Deacon , Robin Murphy , Joerg Roedel , Baptiste Reynal , Alex Williamson Subject: [PATCH 1/5] iommu: Add capability IOMMU_CAP_BYPASS Date: Wed, 19 Jul 2017 15:03:54 +0530 Message-Id: <1500456838-18405-2-git-send-email-anup.patel@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500456838-18405-1-git-send-email-anup.patel@broadcom.com> References: <1500456838-18405-1-git-send-email-anup.patel@broadcom.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170719_023511_677349_A5BB0E79 X-CRM114-Status: GOOD ( 10.07 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kvm@vger.kernel.org, Scott Branden , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, Anup Patel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Some of the IOMMUs (such as ARM SMMU) are capable of bypassing transactions for which no IOMMU domain is configured. This patch adds IOMMU_CAP_BYPASS which can be used by IOMMU drivers to advertise transation bypass capability of an IOMMU. Signed-off-by: Anup Patel --- include/linux/iommu.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 2cb54ad..6bbb4cc 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -101,6 +101,10 @@ enum iommu_cap { transactions */ IOMMU_CAP_INTR_REMAP, /* IOMMU supports interrupt isolation */ IOMMU_CAP_NOEXEC, /* IOMMU_NOEXEC flag */ + IOMMU_CAP_BYPASS, /* + * IOMMU can bypass transactions for + * which domain is not configured + */ }; /*