Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7339046imu; Thu, 31 Jan 2019 08:35:23 -0800 (PST) X-Google-Smtp-Source: ALg8bN66yYtH8amvy4FZRpCYwIwKkk/aN3b7M34p0QJPzUS9LzsrdQ3VfqnT3oOKrtqtvOGankdB X-Received: by 2002:a63:26c1:: with SMTP id m184mr29935380pgm.367.1548952523586; Thu, 31 Jan 2019 08:35:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548952523; cv=none; d=google.com; s=arc-20160816; b=MuAZlJyR51OcdaLBujCa98mP6w1NM0sU5o4ceMY+hFFKumarJ4YR16MTkyTFc1JSP1 35S7i+zq0VYlBLdgejs3Idhf7ZdoPuTUZ9uyzEsFgMG7AB5emkNXwD7Qd3SFuULIraT5 +Ou/nWWTyhOS9QZLURJcMm/Nk56shvq7xhbOxFIl92tS7UmYxHpWoacVAs1R0dRQvbJz 9i5/MOPiMqrTS5RPtIQzehBed2fyKqQP932LX20D6fxyFC3iFHl2K1ZmzrRnDx3mHcF/ Xbq3wyQAzZMfkWL4+70RpnQDnsVJorlAEpK1vQgYeR/6oYgiuy11BpamosHAcsAvAG5W qWVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=zTdaEVKHLdx4wNiURT6KghcCRQHaCV8QQ8oXmhYDu6g=; b=uzQ1SWE57K7jVTUY/kKp5ECS3Kg5q22PL/WMsXTkmdH0abRgWZ7d8gwAREqLTXM/nK 24YaQ693vkSsZEUVfdCLCFH9JKtEDke4+x5L9y+tCj0gdp6+jhDD4pozXij5BQMsG+a4 8LUAuDo3FLycdMWrAL4CkMVPnUtbh6+UsLMTAE5ojUHDtfJteK3JPLHUPUS7OjakWCUW eTtJ+65Xv+58T34Di/VaMYonBHgrc6ko/AEsfwp0FDSpBQmV4Gi9QC2cb2RJyHNqdCux FUeNCf2KmEQuyCvxKZMQHY187cDlNqfl0vGdFu1P3ATdpoo6vkhZq3zqaqMf5lIcjhda bpJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2si4395585pgs.94.2019.01.31.08.35.07; Thu, 31 Jan 2019 08:35:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=8bytes.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388589AbfAaQea (ORCPT + 99 others); Thu, 31 Jan 2019 11:34:30 -0500 Received: from 8bytes.org ([81.169.241.247]:36314 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733294AbfAaQeG (ORCPT ); Thu, 31 Jan 2019 11:34:06 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id BD46322D; Thu, 31 Jan 2019 17:34:04 +0100 (CET) From: Joerg Roedel To: "Michael S . Tsirkin" , Jason Wang , Konrad Rzeszutek Wilk , Christoph Hellwig Cc: Jens Axboe , virtualization@lists.linux-foundation.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, jfehlig@suse.com, jon.grimm@amd.com, brijesh.singh@amd.com, joro@8bytes.org, jroedel@suse.de, Thomas.Lendacky@amd.com Subject: [PATCH 0/5 v6] Fix virtio-blk issue with SWIOTLB Date: Thu, 31 Jan 2019 17:33:58 +0100 Message-Id: <20190131163403.11363-1-joro@8bytes.org> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, here is the next version of this patch-set. Previous versions can be found here: V1: https://lore.kernel.org/lkml/20190110134433.15672-1-joro@8bytes.org/ V2: https://lore.kernel.org/lkml/20190115132257.6426-1-joro@8bytes.org/ V3: https://lore.kernel.org/lkml/20190123163049.24863-1-joro@8bytes.org/ V4: https://lore.kernel.org/lkml/20190129084342.26030-1-joro@8bytes.org/ V5: https://lore.kernel.org/lkml/20190130164007.26497-1-joro@8bytes.org/ The problem solved here is a limitation of the SWIOTLB implementation, which does not support allocations larger than 256kb. When the virtio-blk driver tries to read/write a block larger than that, the allocation of the dma-handle fails and an IO error is reported. Changes to v5 are: - Changed patch 3 to uninline dma_max_mapping_size() Please review. Thanks, Joerg Joerg Roedel (5): swiotlb: Introduce swiotlb_max_mapping_size() swiotlb: Add is_swiotlb_active() function dma: Introduce dma_max_mapping_size() virtio: Introduce virtio_max_dma_size() virtio-blk: Consider virtio_max_dma_size() for maximum segment size Documentation/DMA-API.txt | 8 ++++++++ drivers/block/virtio_blk.c | 10 ++++++---- drivers/virtio/virtio_ring.c | 11 +++++++++++ include/linux/dma-mapping.h | 8 ++++++++ include/linux/swiotlb.h | 11 +++++++++++ include/linux/virtio.h | 2 ++ kernel/dma/direct.c | 11 +++++++++++ kernel/dma/mapping.c | 14 ++++++++++++++ kernel/dma/swiotlb.c | 14 ++++++++++++++ 9 files changed, 85 insertions(+), 4 deletions(-) -- 2.17.1