From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 345D4C83006 for ; Wed, 29 Apr 2020 02:22:42 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0066A20731 for ; Wed, 29 Apr 2020 02:22:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0066A20731 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BD8DE873B8; Wed, 29 Apr 2020 02:22:41 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ua+DPz1QPGD1; Wed, 29 Apr 2020 02:22:40 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 4E38A86FBB; Wed, 29 Apr 2020 02:22:40 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2AA4BC0864; Wed, 29 Apr 2020 02:22:40 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 89844C0172; Wed, 29 Apr 2020 02:22:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 71F9E880C7; Wed, 29 Apr 2020 02:22:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 1rpZUJxGp9pF; Wed, 29 Apr 2020 02:22:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by hemlock.osuosl.org (Postfix) with ESMTPS id CA127880C2; Wed, 29 Apr 2020 02:22:37 +0000 (UTC) IronPort-SDR: 0UwEd7ABne9hYI+iI+3FSazckRpGkGkn219VEuSviDsJDSvSrNIBMYWwWv2H6xyTwjmrx/My7y LRWmfbqzcpOw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Apr 2020 19:22:37 -0700 IronPort-SDR: t/qSzNPhjbSFSg3fCjJzj3YTdCvW1TlKbhSmmEST7wnCHVJo0xkfWM5OPrCfhuevcOufHCdsZv 3ikcNbOtcXfw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,329,1583222400"; d="scan'208";a="246698532" Received: from blu2-mobl3.ccr.corp.intel.com (HELO [10.254.208.67]) ([10.254.208.67]) by orsmga007.jf.intel.com with ESMTP; 28 Apr 2020 19:22:33 -0700 Subject: Re: [PATCH 5/5] virtio: Add bounce DMA ops To: "Michael S. Tsirkin" , Srivatsa Vaddagiri References: <1588073958-1793-1-git-send-email-vatsa@codeaurora.org> <1588073958-1793-6-git-send-email-vatsa@codeaurora.org> <20200428121232-mutt-send-email-mst@kernel.org> <20200428174952.GA5097@quicinc.com> <20200428163448-mutt-send-email-mst@kernel.org> From: Lu Baolu Message-ID: <275eba4b-dd35-aa95-b2e3-9c5cbf7c6d71@linux.intel.com> Date: Wed, 29 Apr 2020 10:22:32 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200428163448-mutt-send-email-mst@kernel.org> Content-Language: en-US Cc: tsoni@codeaurora.org, virtio-dev@lists.oasis-open.org, will@kernel.org, konrad.wilk@oracle.com, jan.kiszka@siemens.com, jasowang@redhat.com, christoffer.dall@arm.com, pratikp@codeaurora.org, virtualization@lists.linux-foundation.org, iommu@lists.linux-foundation.org, stefano.stabellini@xilinx.com, alex.bennee@linaro.org, linux-kernel@vger.kernel.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On 2020/4/29 4:41, Michael S. Tsirkin wrote: > On Tue, Apr 28, 2020 at 11:19:52PM +0530, Srivatsa Vaddagiri wrote: >> * Michael S. Tsirkin [2020-04-28 12:17:57]: >> >>> Okay, but how is all this virtio specific? For example, why not allow >>> separate swiotlbs for any type of device? >>> For example, this might make sense if a given device is from a >>> different, less trusted vendor. >> Is swiotlb commonly used for multiple devices that may be on different trust >> boundaries (and not behind a hardware iommu)? > Even a hardware iommu does not imply a 100% security from malicious > hardware. First lots of people use iommu=pt for performance reasons. > Second even without pt, unmaps are often batched, and sub-page buffers > might be used for DMA, so we are not 100% protected at all times. > For untrusted devices, IOMMU is forced on even iommu=pt is used; and iotlb flush is in strict mode (no batched flushes); ATS is also not allowed. Swiotlb is used to protect sub-page buffers since IOMMU can only apply page granularity protection. Swiotlb is now used for devices from different trust zone. Best regards, baolu _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu