Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4887380imu; Tue, 15 Jan 2019 07:38:37 -0800 (PST) X-Google-Smtp-Source: ALg8bN5Xt5qUJIDIXzVnbrlUz+SyMjL+zmGcPkTmkuDpmAo+Vy5Lr+0k4kTPkMoLkiC7jthxePQi X-Received: by 2002:a62:3305:: with SMTP id z5mr4726323pfz.112.1547566717630; Tue, 15 Jan 2019 07:38:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547566717; cv=none; d=google.com; s=arc-20160816; b=nb/F7ojH6L4F0hm4nSgXZMZw4n5Kyvmi5qD10WC6vWWbcKFXH0xwy1B6eX0fppDiEZ N722YKaS1b4MNbZxraar1u/5jSaa4mYwQ9fWJCbabDtjQqgoinNYCbl8zR5oGDv8PXgb 3OrIRFh4p9Lwv2q3O1/iGYfyxwxmxX0UJN2Aes2sovtgu6ENjA1tFgslh0PoegHkkPGL Lgd7S3CbMRuY3IIy4FS2md4f/DLn9Ac0lL2Tx6Wsfkh23B1+McPxMqMxE3sAJZ7C2iIc JSR8m7MwMllSPQKZH1DnBNV67K14jFceuomwKGVgeW1gIrxnb88A+NVm1aFI3CRHy5u6 f1mQ== 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=GmNcp2DbyYPJ9Btp4bRLZ1Jve1ZTXmkkySzaQi3KPW4=; b=PveMD4q1h/FGakazl654+vu9TcJ3+9oBRR/r+aMk0YOfXffsYGtMV9FAnBdP3RbRW6 suPPLcBW1Dw7uxY62NLd2BWOows3RVoFkhTHZZRxXp4+Fs5nOcepj7X0MKu831WPqlxV H0XDvOflbH12BxMgEFJWFEzEJNbPoyEPCx3/aRu2WH90Q6jD8pa2n9dFSRQeOfkXayO5 pM/BxaOl7iBrFkCVN3S6XTNU/ZKaBGhoazGipyqI4OsGoJXHmmicg0ytgSYrEQUMXmvu NJz5MbNe10V8fd5IPRbjTMYnWFrxDbVjP4ejQm8SXUeVafxaoKOab8jM1j44N0kySxC/ +byA== 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 d92si3689234pld.45.2019.01.15.07.38.20; Tue, 15 Jan 2019 07:38:37 -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 S1729678AbfAONXJ (ORCPT + 99 others); Tue, 15 Jan 2019 08:23:09 -0500 Received: from 8bytes.org ([81.169.241.247]:57736 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727626AbfAONXC (ORCPT ); Tue, 15 Jan 2019 08:23:02 -0500 Received: by theia.8bytes.org (Postfix, from userid 1000) id 3CF402AF; Tue, 15 Jan 2019 14:23:00 +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 Subject: [PATCH 0/3 v2] Fix virtio-blk issue with SWIOTLB Date: Tue, 15 Jan 2019 14:22:54 +0100 Message-Id: <20190115132257.6426-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 second version of my patch-set to fix a DMA mapping size issue triggered by the virtio-blk driver. The problem 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. v1 of the patch-set can be found here: https://lore.kernel.org/lkml/20190110134433.15672-1-joro@8bytes.org/ The change to v1 is that the maximum mapping size is now officially propagated through the DMA-API, as suggested by Christoph Hellwig. Please review. Thanks, Joerg Joerg Roedel (3): swiotlb: Introduce swiotlb_max_mapping_size() dma: Introduce dma_max_mapping_size() virtio-blk: Consider dma_max_mapping_size() for maximum segment size drivers/block/virtio_blk.c | 10 ++++++---- include/linux/dma-mapping.h | 16 ++++++++++++++++ include/linux/swiotlb.h | 5 +++++ kernel/dma/direct.c | 10 ++++++++++ kernel/dma/swiotlb.c | 5 +++++ 5 files changed, 42 insertions(+), 4 deletions(-) -- 2.17.1