Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp712502ybt; Fri, 10 Jul 2020 10:24:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxugT/Uii2Ys0jMY8pXfHcXJT4lpync5vKrQVsqrl3NDhvPqiDQfEVX8mE2Wo0Jx6l+neH1 X-Received: by 2002:a17:906:3152:: with SMTP id e18mr64315840eje.137.1594401858108; Fri, 10 Jul 2020 10:24:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594401858; cv=none; d=google.com; s=arc-20160816; b=BZ3MoPGsE2aG9jx13SL+8QPyQHTtDS2n85253fa++PNTjl5fIavq0JHw2vQl8MwvVg 8QrVoxxDmWDg4teOAMctv71e+352eHRKV4tPDX08wJpAGNe135aMeIFCsG0n/cGbILwd KnHfJFV02JV/3zAjJPUQm9HNWstI7uBrRFOTyTog5KsR5oTueACFu5pdgkRRiFaD5n5D sIMiLmksETrt2ZlG38x//oyC/IYWjG+RyBSwofNqvD+sjtzm3CGsWApFodOt65u2j/ol BIK3DGaf3PbSd+DrQ3z9JPDNVX+IOefCkspQUYqPy7wgdexC61KV7upr4s4wDqo/qkNT z9ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=EDj3sshRZH1NVLbASS2MGQ4vMoqEpaQXkX1Dq/bqN9c=; b=KFdYf/tk0i7PBHRqlCsCH8U7UvQgTI1OLmkUrkyj7YsQ7/AaBfbKBE0T19KvIHO3QT 5hbA8idA+HEEGV3QUvGvMYUxMKfWTIF25l2yPKHFUClNebnbIRPT13JCrr9SEhreY2cm B5PwvD2vzAivoBqKg2uw5Bk/QSE05GMPjdBpJYex8eYyTdQd7FS5SRv0QfNrUy0R3J8v seFrV7r6LnXo3leL9GUfX9Uc2txYtAfH6LdnieoU1M6vwFzYAI+DYfSC93QByChwu6XP TbwrAlwlkCi6eHusWOwY6gWqvOQRwdj311s9EGjdG6L/QBXc9K+yh38dLKXboj4gk9ev Uymw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GCGvc7A2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f20si4516241edx.189.2020.07.10.10.23.55; Fri, 10 Jul 2020 10:24:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=GCGvc7A2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728264AbgGJRXY (ORCPT + 99 others); Fri, 10 Jul 2020 13:23:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:50950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726950AbgGJRXX (ORCPT ); Fri, 10 Jul 2020 13:23:23 -0400 Received: from localhost (c-67-164-102-47.hsd1.ca.comcast.net [67.164.102.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 74D2520725; Fri, 10 Jul 2020 17:23:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594401803; bh=rAuE9jeGeeqGhOCjOngLXVOcRpO0n8j8ZAoZml36l+k=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=GCGvc7A2swdSgZQM9VLG6v6Isa3U81e3H+SQmUSOjoXi7vktetME438dMXRJ34H42 aHNMQA5n4X6fIhkjfedVLzGsZTRHDfLQzo6Rgey4siWO2M2zMc4v1OOqc5/8LkhvZ0 kmIReJDrRl+BKA5/P1OJYrcEUZELDKqQOgt+LAAk= Date: Fri, 10 Jul 2020 10:23:22 -0700 (PDT) From: Stefano Stabellini X-X-Sender: sstabellini@sstabellini-ThinkPad-T480s To: "Michael S. Tsirkin" cc: Stefano Stabellini , jgross@suse.com, Peng Fan , konrad.wilk@oracle.com, jasowang@redhat.com, x86@kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, Christoph Hellwig , iommu@lists.linux-foundation.org, linux-imx@nxp.com, xen-devel@lists.xenproject.org, boris.ostrovsky@oracle.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] xen: introduce xen_vring_use_dma In-Reply-To: <20200701172219-mutt-send-email-mst@kernel.org> Message-ID: References: <20200624050355-mutt-send-email-mst@kernel.org> <20200624163940-mutt-send-email-mst@kernel.org> <20200624181026-mutt-send-email-mst@kernel.org> <20200626110629-mutt-send-email-mst@kernel.org> <20200701133456.GA23888@infradead.org> <20200701172219-mutt-send-email-mst@kernel.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Sorry for the late reply -- a couple of conferences kept me busy. On Wed, 1 Jul 2020, Michael S. Tsirkin wrote: > On Wed, Jul 01, 2020 at 10:34:53AM -0700, Stefano Stabellini wrote: > > Would you be in favor of a more flexible check along the lines of the > > one proposed in the patch that started this thread: > > > > if (xen_vring_use_dma()) > > return true; > > > > > > xen_vring_use_dma would be implemented so that it returns true when > > xen_swiotlb is required and false otherwise. > > Just to stress - with a patch like this virtio can *still* use DMA API > if PLATFORM_ACCESS is set. So if DMA API is broken on some platforms > as you seem to be saying, you guys should fix it before doing something > like this.. Yes, DMA API is broken with some interfaces (specifically: rpmesg and trusty), but for them PLATFORM_ACCESS is never set. That is why the errors weren't reported before. Xen special case aside, there is no problem under normal circumstances. If you are OK with this patch (after a little bit of clean-up), Peng, are you OK with sending an update or do you want me to?