From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28ACFC433DF for ; Wed, 1 Jul 2020 21:23:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 05CDA20853 for ; Wed, 1 Jul 2020 21:23:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="crw6jiU7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727828AbgGAVXm (ORCPT ); Wed, 1 Jul 2020 17:23:42 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:31610 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726144AbgGAVXm (ORCPT ); Wed, 1 Jul 2020 17:23:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593638620; 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=m2r4biBmgD4usQWexXh9vBu72j/PA8sqQ6Ual1zjZVg=; b=crw6jiU7NhllWsejLks+KSy/+5heCSBlI+u1DNJL2cT6+NItN82GvS+jfs17iRKCIBbGAp WyPqN76wPTH65j/okO6O+/uOTgo3EYLtA56qxDTEbJJunIMBrN5a9rpcm5bdgnxjHWgovX NdXLwRk8svEcRy+4XpXZbIx0kcEUf48= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-466-4k_3co6SOTSedzKSiL7HHg-1; Wed, 01 Jul 2020 17:23:39 -0400 X-MC-Unique: 4k_3co6SOTSedzKSiL7HHg-1 Received: by mail-wr1-f72.google.com with SMTP id j16so17151262wrw.3 for ; Wed, 01 Jul 2020 14:23:38 -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=m2r4biBmgD4usQWexXh9vBu72j/PA8sqQ6Ual1zjZVg=; b=jEzOYrgxJFjv8xZFfLHLVhMCnYsKWLQFyph9Q/BmKuTxKJQMHbiDRHdd0ic64gSj8w SCwKixUBot5g8LRK1TgAbst2ZPeSaWrk8H2AfacqjBpCkObc0WEKdtRnD6WH35YvvOEc 6sERuzNZf7Ryva6OCi7zOrg7QLvb60x+fTnphXE4XSI4PVMJGRv0H8rxXcwQRsCrRGh9 h7oCtEhSM1aQPE/LG3ZkTiyOg/2TCgz5YTwXZxf6quZIjhi6Rn2ry6Jcm/5MI6cn/l9z O7iMFONqSurvT/C0yoO75al/Gp65WYPJmaBn1rJvgsn6IAVjJXtJOBV3ovapk5Rh5jfZ nP4w== X-Gm-Message-State: AOAM533pGMnLX5N8rGU9plSRsdwr8xYM0ZpxZmOIhYMrVTW6Mj8mcc/E iSiLAUDTqwS8POsR3Vu4YDCn/UnSc35TpuoCuSXvbNmJSY7TrvkotUd02VkB0l9wrQAcsnD8zai 2gtsJptP4OSqfTYFAXNvTYkZQ X-Received: by 2002:a5d:6b8c:: with SMTP id n12mr28640726wrx.352.1593638617972; Wed, 01 Jul 2020 14:23:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ5EOdK3/I7t3hzH2nXxlZ8gKRo3bNG63qK7yosafmw6Hvgwi6pb2IZMrXml3ZBqz0x5VNnw== X-Received: by 2002:a5d:6b8c:: with SMTP id n12mr28640715wrx.352.1593638617762; Wed, 01 Jul 2020 14:23:37 -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 d63sm8905146wmc.22.2020.07.01.14.23.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 14:23:35 -0700 (PDT) Date: Wed, 1 Jul 2020 17:23:32 -0400 From: "Michael S. Tsirkin" To: Stefano Stabellini Cc: Christoph Hellwig , jgross@suse.com, Peng Fan , x86@kernel.org, konrad.wilk@oracle.com, jasowang@redhat.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, 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: <20200701172219-mutt-send-email-mst@kernel.org> 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> 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 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.. -- MST From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1FCA2C433DF for ; Wed, 1 Jul 2020 21:23:46 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E9E412085B for ; Wed, 1 Jul 2020 21:23:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="crw6jiU7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E9E412085B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id BAF908BEF0; Wed, 1 Jul 2020 21:23:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oER8X0B+dQzz; Wed, 1 Jul 2020 21:23:44 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id 179278BF04; Wed, 1 Jul 2020 21:23:44 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id E8731C08A2; Wed, 1 Jul 2020 21:23:43 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id D7448C0733 for ; Wed, 1 Jul 2020 21:23:42 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id C69798946D for ; Wed, 1 Jul 2020 21:23:42 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EV6_JPJHKOtF for ; Wed, 1 Jul 2020 21:23:42 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 23A6589252 for ; Wed, 1 Jul 2020 21:23:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593638620; 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=m2r4biBmgD4usQWexXh9vBu72j/PA8sqQ6Ual1zjZVg=; b=crw6jiU7NhllWsejLks+KSy/+5heCSBlI+u1DNJL2cT6+NItN82GvS+jfs17iRKCIBbGAp WyPqN76wPTH65j/okO6O+/uOTgo3EYLtA56qxDTEbJJunIMBrN5a9rpcm5bdgnxjHWgovX NdXLwRk8svEcRy+4XpXZbIx0kcEUf48= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-36-8tdjstEiP2qk5uAo1PtrlQ-1; Wed, 01 Jul 2020 17:23:39 -0400 X-MC-Unique: 8tdjstEiP2qk5uAo1PtrlQ-1 Received: by mail-wr1-f69.google.com with SMTP id o12so22386921wrj.23 for ; Wed, 01 Jul 2020 14:23:38 -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=m2r4biBmgD4usQWexXh9vBu72j/PA8sqQ6Ual1zjZVg=; b=cAu2+/4oPfMjMtlhELcSHPkm1bhNdb8b976BIp6+I/WokluvpK+TU8HBMsShpJAhOT EkLEXafbuACFTE4Jn+f029wn8F5AFSuc9IrZ+paAr5//oARCpEkLJuQk8wvHlfnASgKG 5jewIdgAyXMNk/Qr0VOOtzLjGVLIW9/U52eTqXrSZzCpA/4V9dE9zG70+2lMPSQ6VAjy nK2rnJ3bMBUNI1ODC094nu+sRaGZgJ1C37s2c7kPLZYuZjpIGglLoz7bTVlKae2B99q2 WewyzRl0bmddZ6clQMVy24nQlduUZ2tsnoSqocW8D0XxzAs788OvhWeojSxsJ6SM+oLs MFOQ== X-Gm-Message-State: AOAM530PXMmEHaTgzKMGBx1gRIzc39ZDd0YOZgLu8dblMlPN15Yt4By1 4/N17t6Kf/l+2VA2u/HbLpWR4mnpS+vjjavO8R7g6hia+E+o978I48wIYVSPiEdnJ261Qg0jWuk qSkEwZmhbd4+mDWdeNRwl4DZhuqA01g== X-Received: by 2002:a5d:6b8c:: with SMTP id n12mr28640738wrx.352.1593638618034; Wed, 01 Jul 2020 14:23:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ5EOdK3/I7t3hzH2nXxlZ8gKRo3bNG63qK7yosafmw6Hvgwi6pb2IZMrXml3ZBqz0x5VNnw== X-Received: by 2002:a5d:6b8c:: with SMTP id n12mr28640715wrx.352.1593638617762; Wed, 01 Jul 2020 14:23:37 -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 d63sm8905146wmc.22.2020.07.01.14.23.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 14:23:35 -0700 (PDT) Date: Wed, 1 Jul 2020 17:23:32 -0400 From: "Michael S. Tsirkin" To: Stefano Stabellini Subject: Re: [PATCH] xen: introduce xen_vring_use_dma Message-ID: <20200701172219-mutt-send-email-mst@kernel.org> 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> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline 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 X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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.. -- MST _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 117A7C433E0 for ; Wed, 1 Jul 2020 21:25:00 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D250720853 for ; Wed, 1 Jul 2020 21:24:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="d33IS12y"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="YdkNiwFw" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D250720853 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Fq2jPzTLxYmB1YObt2m7WoapE5xgb2oy/Vj/uKz52rM=; b=d33IS12yBjAn3v89Blxafx6QG yRO5PCx1R2zTHSKqUS5KYgi0aWnW80la/2Ww6RcIxy5aGIY0l1EIX3tFWxFiu5AaIjq1tgCDopT31 isywQtWR37nxuue2NdyDgeeA8I1vEURzdO/GUavcoPgNk39LXGD8bmE3Z30HNjH0J+u+ZXlj0jXf2 sl5ymtLVXs5mgJIfQmP/cCiqT+Ixu7TWOC/q+0CjWREfEyX+BWmcpcZzTmOv8AOo+OreM9FP2YJ7Q 68g2Z4FqJYYFcHGRmNkq5/EF2/b+29Y6NhGCM2gXTX06DX4TQFCDh7qKCnc1DOZGhxOrT3LHVFAJD FNoom/oWA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqkCo-0002Ln-Oa; Wed, 01 Jul 2020 21:23:46 +0000 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120] helo=us-smtp-1.mimecast.com) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jqkCk-0002It-CI for linux-arm-kernel@lists.infradead.org; Wed, 01 Jul 2020 21:23:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593638621; 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=m2r4biBmgD4usQWexXh9vBu72j/PA8sqQ6Ual1zjZVg=; b=YdkNiwFwYuHEnWjCucvss1OSPrnnsZHHIMs2GcUHn+QqmR9JVLeketEj/s+rmsRzUBLdTG H0wV4MBVU9mzwE82zgATmqXj/SKRWKLqpy4cce144EEHkCalixcnwzn2fWyzDRVwH2V/Gz tFsu+jb6+cvFL646XtqIlkogpf8S4oc= Received: from mail-wr1-f72.google.com (mail-wr1-f72.google.com [209.85.221.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-486-wdYGPUu1OBSHPnpKQE9COQ-1; Wed, 01 Jul 2020 17:23:39 -0400 X-MC-Unique: wdYGPUu1OBSHPnpKQE9COQ-1 Received: by mail-wr1-f72.google.com with SMTP id c6so3361749wru.7 for ; Wed, 01 Jul 2020 14:23:38 -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=m2r4biBmgD4usQWexXh9vBu72j/PA8sqQ6Ual1zjZVg=; b=koxdQUlzp3fmJU0RhHrUzGvEkbU48IVL3UOCHPWYt2sZpCw6FHx3xGPJ+vAsJZJCY5 0I7S65YtSjZ3ElSNzxZcCSZenhe/8jGOrHktoh2Kjkw02aJLyo2HUeYvnUM0K9On8g1G jiDYHgRhoyxrnksLK5ndcKaj3HWc5zIWlpaw1h7F+LGWTorU2/PqLZdQiJnFj+CU6/c1 xsE7Zq4QCCQ9p1nDbQ75gQw9QwnVf9tflTWypoLQWXmOpVDRdHRc85gFlgqkBUtBnGJa oQD0jO/IQlatqsnGuXBk2eG2YeI1RG8Y1f696IfUT6nAlf88GJ14zD+KujgdGd86CGuG dz3g== X-Gm-Message-State: AOAM531zdK0XA3fuGFbDaK4JG9+JsIdvkC7bzSBa8MiS9tKfmSo+ibnO idZXvKhb+L5l2D0bWP3HfWyFGQyYYplKvAxlQBdrMgL58FEb+GHUeUqlCxznZ6PkUI7pcnaHxS+ SCa69oJGG0XrlOk8FrXx8BzIkOGeST+chaIc= X-Received: by 2002:a5d:6b8c:: with SMTP id n12mr28640727wrx.352.1593638617973; Wed, 01 Jul 2020 14:23:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ5EOdK3/I7t3hzH2nXxlZ8gKRo3bNG63qK7yosafmw6Hvgwi6pb2IZMrXml3ZBqz0x5VNnw== X-Received: by 2002:a5d:6b8c:: with SMTP id n12mr28640715wrx.352.1593638617762; Wed, 01 Jul 2020 14:23:37 -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 d63sm8905146wmc.22.2020.07.01.14.23.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 14:23:35 -0700 (PDT) Date: Wed, 1 Jul 2020 17:23:32 -0400 From: "Michael S. Tsirkin" To: Stefano Stabellini Subject: Re: [PATCH] xen: introduce xen_vring_use_dma Message-ID: <20200701172219-mutt-send-email-mst@kernel.org> 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> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Disposition: inline X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200701_172342_467409_C8F0C5B2 X-CRM114-Status: GOOD ( 11.86 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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.. -- MST _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4B75CC433DF for ; Wed, 1 Jul 2020 21:24:06 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1A14120853 for ; Wed, 1 Jul 2020 21:24:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Frob1QcE" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A14120853 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jqkCm-0002iT-8A; Wed, 01 Jul 2020 21:23:44 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jqkCl-0002iO-3i for xen-devel@lists.xenproject.org; Wed, 01 Jul 2020 21:23:43 +0000 X-Inumbo-ID: 2335f852-bbe1-11ea-8786-12813bfff9fa Received: from us-smtp-1.mimecast.com (unknown [205.139.110.61]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTP id 2335f852-bbe1-11ea-8786-12813bfff9fa; Wed, 01 Jul 2020 21:23:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1593638622; 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=m2r4biBmgD4usQWexXh9vBu72j/PA8sqQ6Ual1zjZVg=; b=Frob1QcE+rnIvaVsB8k1AiEVRY+qE9u3ThkorDAkHfQ0mG0lz2JmkYSDt5C651cZAoWaWA kQh8g2gRehTiVbt6jrEqSXH88vaBVuHDyCvWJj64CWz8ZMcr9xbN/neZ27wO5pwYZ9SNd3 0UidxTkhxPfsL0eVn0tAHVmGSAhEVLk= Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-160-03hKAwVoNrmUTk_-qTHYyQ-1; Wed, 01 Jul 2020 17:23:40 -0400 X-MC-Unique: 03hKAwVoNrmUTk_-qTHYyQ-1 Received: by mail-wr1-f69.google.com with SMTP id i14so22362529wru.17 for ; Wed, 01 Jul 2020 14:23:40 -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=m2r4biBmgD4usQWexXh9vBu72j/PA8sqQ6Ual1zjZVg=; b=Kig+qeBSZdBFbf0mZPn2ShswRAC8SwhOfduQL4bvthvOTBdUqUke7zpF1N+4ZiYQ1/ 3LwstOFjWGbS2ZM19PwfprI2gVV7TIPQhZtHAvrd2QtGdaESbL1aitwZdqahf53rgRCf ZuKO/9a6P9bcMGHOok34Zo0uKIEwo9i/eUHP8/B4Y+FdATE/e/w5HQtwbCUkuNJrsyme jM/Mh7dT8E7wzt2DxHVk4VUvHfJZ40RFeSKmd3rK/W4Vea9deFzekddh80bZji0+AhNn soRJeOR8q7rxCFFsvhIpm7gpJ+dUdCiIuFNvSwRWTrpP8wPnnWguqzT2ZrVZwvuAIEmJ BzFw== X-Gm-Message-State: AOAM533+Uc53ROksm61AkgHwQzoOYoZ0lb7lyVimuLRQoUR3QVNQWqTt 7qGrWMmk9lGzu98bI/CNIdHHHqFw8DAyl/XhRtM/hItTQidBUvOs3LAz5/nlnZl3eZvngas5Gm3 oKm7uvZDy1KRjRaus2V2pYJBAgok= X-Received: by 2002:a5d:6b8c:: with SMTP id n12mr28640728wrx.352.1593638617973; Wed, 01 Jul 2020 14:23:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzQ5EOdK3/I7t3hzH2nXxlZ8gKRo3bNG63qK7yosafmw6Hvgwi6pb2IZMrXml3ZBqz0x5VNnw== X-Received: by 2002:a5d:6b8c:: with SMTP id n12mr28640715wrx.352.1593638617762; Wed, 01 Jul 2020 14:23:37 -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 d63sm8905146wmc.22.2020.07.01.14.23.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Jul 2020 14:23:35 -0700 (PDT) Date: Wed, 1 Jul 2020 17:23:32 -0400 From: "Michael S. Tsirkin" To: Stefano Stabellini Subject: Re: [PATCH] xen: introduce xen_vring_use_dma Message-ID: <20200701172219-mutt-send-email-mst@kernel.org> 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> MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mst@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , 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 Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" 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.. -- MST