Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6207477imu; Wed, 30 Jan 2019 10:36:10 -0800 (PST) X-Google-Smtp-Source: ALg8bN6oem8CVDsEsRICmqsZ47IotChqb2roiaHGRzXQcEsvJ8hs7Mt7r7eCS3TNnqQoXw5NUGUF X-Received: by 2002:a62:56c7:: with SMTP id h68mr32934955pfj.134.1548873370488; Wed, 30 Jan 2019 10:36:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548873370; cv=none; d=google.com; s=arc-20160816; b=mo7j/LQOU53WX9cpGWs2uIOb9bXGCaMfa+ffUjgKNw631ydzqkayHxBzc49Jqa6gOu +v0jT4xPKXGacH/8+5NoIVGNPriSXM5SBdQLKwPiA/cP389FAiXR25ol98NKjj5voBqZ JKM8k4c76WjoL7VX6PdKEzzmyf3v6UtWosAbSMjSPSE/2U0e9sMAtdrfTIpCiSiDK9D6 GhsgUfUMWPVdtHcrUswCBstVu0Vip6Hgql+Xq3pczOjyzXlD6TMu4BH6C09iVHJCYiR9 aA3Mvrin9grdjz8h6WolsklG9nrEKzOeuqpnlVt8TSDCMoOfrER81PWPTNZycWjtn5pC gWLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ACWEh6HzBHmJZCdYbSI2j5nHsH2aiDUTZoXaRxS6Trs=; b=HhmYKI/TuWK2R6qmaIGIzcNrn/epaNrSYmhawSR6JwkutF/cloLWC1hMwKJC2rP66+ KkUH1fwYWK/ygMU7ZwfOUAzsXmCfpuLHrW11Q82C97orypLMv1W04682DEIkYshXMU6A sDjJSdScwfMB4uZ1jJe9ktAi/xvlRZ38hnM+5jRCWHOOz9Z1NDJgf5cEbuXvqxX5s3K2 bC+yd01XIFilS+0FtrZjAKW6hm6uvj6eYzO6LgMES5DWIWvbVKao4BkM28lZANLwaNcF Npige7+rLimLZ8v/FWoZlfVwMxQaiWFTW1HVMLuC+AbQD48i4SDb7GnbSNa0/Wlgqhs1 WYlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b="4Bxx/y76"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s38si2061302pga.38.2019.01.30.10.35.55; Wed, 30 Jan 2019 10:36:10 -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; dkim=pass header.i=@oracle.com header.s=corp-2018-07-02 header.b="4Bxx/y76"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733122AbfA3Sff (ORCPT + 99 others); Wed, 30 Jan 2019 13:35:35 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:60862 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733050AbfA3Sff (ORCPT ); Wed, 30 Jan 2019 13:35:35 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id x0UIT0lt075111; Wed, 30 Jan 2019 18:35:17 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=ACWEh6HzBHmJZCdYbSI2j5nHsH2aiDUTZoXaRxS6Trs=; b=4Bxx/y76EXVwScZPSGQuTfKPiJKcfDZEtUUGcw62nQW3uR8mo9khoF3bRuOCzjkWMKoi +MauwVUxNx29FZJBOEKtP7ns8zjJxbYLtYyXQl9gRFT4V4tKJMwaumt4K2N6v7hqYGoE jmyXlzx7poziEP1aCjQth13xJ/8yXp6xhTSR66HYJDnOt51KeqZ9aME1WpDi4Y5+V4Ar BuPh81crZLSH3ZM8sGv1dmhFqx535Xv0eV3GETNZ4Db5U3gD7prWsnndshLi6AlHbSvq 6wslai1g9cVx+BtPaSbFIf2bIifkK3VEYrjfT3Nkyepvfavc7xcz/vKlJpP9LILdTcOa mg== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2q8g6rc908-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jan 2019 18:35:17 +0000 Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id x0UIZGQh005864 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 30 Jan 2019 18:35:16 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0122.oracle.com (8.14.4/8.14.4) with ESMTP id x0UIZGQe026214; Wed, 30 Jan 2019 18:35:16 GMT Received: from char.us.oracle.com (/10.152.32.25) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 30 Jan 2019 10:35:15 -0800 Received: by char.us.oracle.com (Postfix, from userid 1000) id E8DB66A05F7; Wed, 30 Jan 2019 13:35:13 -0500 (EST) Date: Wed, 30 Jan 2019 13:35:13 -0500 From: Konrad Rzeszutek Wilk To: Joerg Roedel Cc: "Michael S . Tsirkin" , Jason Wang , Christoph Hellwig , 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, jroedel@suse.de, Thomas.Lendacky@amd.com Subject: Re: [PATCH 0/5 v5] Fix virtio-blk issue with SWIOTLB Message-ID: <20190130183513.GB27284@char.us.oracle.com> References: <20190130164007.26497-1-joro@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190130164007.26497-1-joro@8bytes.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9152 signatures=668682 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1901300140 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jan 30, 2019 at 05:40:02PM +0100, Joerg Roedel wrote: > 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/ > > 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 v4 are: > > - Added Reviewed-by tags from Christoph > > - Added missing EXPORT_SYMBOL(_GPL) lines > > Please review. I can put it in my tree and send it to Linus .. unless folks want to do it through a different tree? > > 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 | 16 ++++++++++++++++ > include/linux/swiotlb.h | 11 +++++++++++ > include/linux/virtio.h | 2 ++ > kernel/dma/direct.c | 12 ++++++++++++ > kernel/dma/swiotlb.c | 14 ++++++++++++++ > 8 files changed, 80 insertions(+), 4 deletions(-) > > -- > 2.17.1 >