Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1489004ybt; Sat, 11 Jul 2020 11:45:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfvh26lHmH5Obsrm8G4E5VcMO88jw1qgtSD6hZzqBgL2jGAhKKMwLpDe8+f9DBjvWSq6kc X-Received: by 2002:a05:6402:319b:: with SMTP id di27mr85180409edb.133.1594493145977; Sat, 11 Jul 2020 11:45:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594493145; cv=none; d=google.com; s=arc-20160816; b=rAWEUevfc5qtnMQ74nWw6m1oNP/SBhkAFtJzyY31bksoFy3+pfsvGRM39i9LgFaa+u Ux0SOGOHpwkIdFD8+0b8i3P1xpXkIIawTeCrvWqCYfREZYTVivZasKhK7JGZk8IHtw0L KfyemSLa9vdkBCfEMNMikcpFBQ0jafi/mb4sKdhWjzyDpqOtP1b3K/oEJFrVUHpwITtr PdXv0JiaOq7GSnjPwbBiGq8eI//+Sg1pxixM4okT0XUwU8DXGXv4vVp2FBDEE4Pa2OWo 3vz6kzLN4JByTmZ5tNv/pVwXJXZlYqLyRruxJkJG3xgraOJR5vTyJqkFPqnjgwNDUBmM YoJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=bS19/wWScaoigC28WtauFL/l6Ha+uxblMLUn/Mypy1E=; b=wZURhBFxVATZX10m9SWhkEq8h9ZePPVPNKrf++trJXs1ZuDV+xv5yUF+X5sQmfmWn4 Qp3tlCbefYxpg3NATgPToyZF/S4S2nM6t3Xdb2Hz74GhuB2nvCq9nyQxlNFsmG9PgLcv Lh9BvUQf/zfhEdoe8JTghpAwYoxHJI6o4MrDSfnHBw5qdo48tPJQJmdm9RS452GZ/OJ+ Gp7zML5c7acaY5FFQN/nb93T3KIIqwxrVkW1820XjW+ktazpEA3b1Ed/uki9rpP1CUbu uWS1PqclCA5S4NeqjhGtctXOiKkQfmRwEWZVt/XDgR5RBo+zMkQznI3cEwt15m38M0vo psZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=LUUoqlHW; 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id md1si5913157ejb.749.2020.07.11.11.45.21; Sat, 11 Jul 2020 11:45:45 -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=@redhat.com header.s=mimecast20190719 header.b=LUUoqlHW; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728697AbgGKSoq (ORCPT + 99 others); Sat, 11 Jul 2020 14:44:46 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:60605 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728390AbgGKSop (ORCPT ); Sat, 11 Jul 2020 14:44:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594493083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bS19/wWScaoigC28WtauFL/l6Ha+uxblMLUn/Mypy1E=; b=LUUoqlHWdEdqWIFPbe6aezWDRE8tg56W/l3P9CiayVL6L0HJxUcKQ12Er481lgZaYNu03s BJYOew+hMi9QTit/vP/isJfKujfRCGsCKanRYN3R9tOnd0fscWWT+f0oBl6oekpBOsBOhG Th7HJp5SLN2N2rhIXtbTzInotMXTvFk= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-352-eol0BVGvPb-gDxFH5urOGw-1; Sat, 11 Jul 2020 14:44:42 -0400 X-MC-Unique: eol0BVGvPb-gDxFH5urOGw-1 Received: by mail-wm1-f69.google.com with SMTP id g124so11748818wmg.6 for ; Sat, 11 Jul 2020 11:44:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=bS19/wWScaoigC28WtauFL/l6Ha+uxblMLUn/Mypy1E=; b=KhHyMTfRc//pyvO6HqIURW1GeJH5wlzbb5WPHlR3AQaIOR04I819j9P1QtY2CbyLIZ As1sd6TaHSkmC87yk2rVsA75vbcHRB8Dy1rgtuckjoc2RatdwOnAAp7/xGwXQZgYLeNq 0GCd0mkJrVXujjQoTQj+rl1l1Gu9qQ5JlMLq0Y9L9r4mRpPPU3AH8s5rly+036nM4hPw 2mL0+xcnzl+zRaNEy7WKeM7H/A9eM0Pu9VWHm+3phPaSv5lk53EkzNiGjwBrhdqBnjN4 f2xD8Sh0fcHQN8RTCNGPxqoZ2TObdoNyIYiKOaa7Fb47i6ZghGsxkC133ZhOdMXHXU7u dZ9A== X-Gm-Message-State: AOAM53061Vw6llkBnLiDRtfbMovJyEU9RYY4b85FnZv5wLOQqh83DMPx qfQyy4BcOwUyS2zkWj7IxOoAh9k57F572nxLgy1I2c0OBhV8c8ZNJXpSCXz2mQN54F7Z1eIIpLR +435mOizlSz2Dzq1Vl56N47h1 X-Received: by 2002:a1c:b686:: with SMTP id g128mr11471076wmf.145.1594493080465; Sat, 11 Jul 2020 11:44:40 -0700 (PDT) X-Received: by 2002:a1c:4d11:: with SMTP id o17mr10838336wmh.134.1594493079525; Sat, 11 Jul 2020 11:44:39 -0700 (PDT) Received: from redhat.com (bzq-79-182-31-92.red.bezeqint.net. [79.182.31.92]) by smtp.gmail.com with ESMTPSA id a84sm4541096wmh.47.2020.07.11.11.44.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jul 2020 11:44:38 -0700 (PDT) Date: Sat, 11 Jul 2020 14:44:34 -0400 From: "Michael S. Tsirkin" To: Stefano Stabellini Cc: 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 Message-ID: <20200711144334-mutt-send-email-mst@kernel.org> 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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > 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?