Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp599804ybh; Wed, 15 Jul 2020 10:06:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhxta57oUM4bjg/9sm6pOnqGKJpUIlSUBKibIwdvqR4L/6CWejAFYlYRzhRhrQ5MrANoi3 X-Received: by 2002:a17:906:3bd5:: with SMTP id v21mr9702794ejf.329.1594832818333; Wed, 15 Jul 2020 10:06:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594832818; cv=none; d=google.com; s=arc-20160816; b=XsRcd5B0XYfsXMzbmykHAcCDcbCdv13shdtwGzZ+LlRx0XP9GqX1/S+n5QjqgVxXHk ApK5ro6P1Fv8MtD5yjNlR14ZgVx15e5HbnjghiQqWoGuqLgP009deQF9tIRDutEnonBU e9Pys9uhwGdko8aO4AlvflGeoFVG5rIa1q+hYkhHtsB7r1R8f3wC+5jFqameW9vM4Dgg DZYG8EwAFw9cc5Gypyn1dTxvJG3i4RSLHKcJVQqLrBleNoDSF3W3LmFU3xnvBMAWNfD0 si9BVZpKvOeWFdMb9vZIJeXeaLI4ywuotLf0nkB2Q/1T2uHn1KHrjAb5ngapL7bHvBbt eNYA== 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=7w7E5fpjJyI1eI8zi4x/5rW1fFMxnEvKLDvHrhtPgSM=; b=ZkOTAF+EHx+yLErkYPXQ3GJQ3a1Dwyijp216yfx+LrPlTX7HNXra2CahRhP0PZ/1p9 lKAP5KcDDG1Uf2nmF5cm66qWsfIE3x/T8ocrfh/ZKK4l+x6rdjx2m/d/kXk07HWJC5W4 lF/1X4ATVNLx9MIJE7jVUy1jAD0lNFxJ6CglqUTkraFd3fsyY1BUQKTyFRZpPp9jHiQ7 Z/iv13SpaF9/RRsTjEYwX1RQ7wRXIX/e/K3pFohMviVodgSZiwgDmni5tFL7bHSII02L LoQMdYk5TOJDaf7BNvrizlx519LVnP6uQnTmouhRBK1b/JSorYqgklouczwoshy+p8aQ AfUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CBPLDZ0a; 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 do14si127118ejc.39.2020.07.15.10.06.33; Wed, 15 Jul 2020 10:06:58 -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=CBPLDZ0a; 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 S1726431AbgGORGC (ORCPT + 99 others); Wed, 15 Jul 2020 13:06:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:35364 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725838AbgGORGC (ORCPT ); Wed, 15 Jul 2020 13:06:02 -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 0D53F2065E; Wed, 15 Jul 2020 17:06:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594832761; bh=MVQs60eyaseKttygMi5Okmio5UqpxovjpBaGYM2KopU=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=CBPLDZ0a2kofL5+ir7rsYDlbbpzpSFpGzRjY5GXtgxKoOkAVo9rx/IXw2nZaAg6FP 0PGoTpRFSOeEWLcCxLE4J3D3xFoVDU+sXxptoew5BleNGM0IN0YcxXbu+SlhudGRTe VCtmQZUU53N6u7CQ+nguMHVqQdrr4STCBfllpVWM= Date: Wed, 15 Jul 2020 10:06:00 -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: <20200711144334-mutt-send-email-mst@kernel.org> Message-ID: References: <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> <20200711144334-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 On Sat, 11 Jul 2020, Michael S. Tsirkin wrote: > On Fri, Jul 10, 2020 at 10:23:22AM -0700, Stefano Stabellini wrote: > > 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. > > So why not fix DMA API? Then this patch is not needed. It looks like the conversation is going in circles :-) I tried to explain the reason why, even if we fixed the DMA API to work with rpmesg and trusty, we still need this patch with the following email: https://marc.info/?l=linux-kernel&m=159347446709625&w=2 At that time it looked like you agreed that we needed to improve this check? (https://marc.info/?l=linux-kernel&m=159363662418250&w=2)