Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4584763imw; Tue, 19 Jul 2022 09:16:49 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uUagTzQ46nCL0vG0eLnqQTXs4zfVA+bKz5es6tnsh39XfCT52/JMZKxXzUZeYVIK0LsYLm X-Received: by 2002:a37:bb84:0:b0:6b5:cd07:93a9 with SMTP id l126-20020a37bb84000000b006b5cd0793a9mr14630665qkf.419.1658247409442; Tue, 19 Jul 2022 09:16:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658247409; cv=none; d=google.com; s=arc-20160816; b=MDzTInlsIwQ+cF79C6mpvFDfSmfKd3ErKat6wCI7EhSb4a5RW7zYix2PsNRW+Ih9l9 D+M4eKKU5iCeu2dzGa7gCeZPl4wX36dm1yujPwR+6RkkJcuYpC0eVnQmqRFEHdUPv7hv VQdhDQMJk8QPK5F7Wf6UXGX3dypUSJhJ+HLxSaNYtizuwBUoPBlA/H9w150kWYzJd897 gLEWjIyCXZSFpou8u3uqwkju/Kid5YYG6JpStSJKsD42IU7BeGMTAG0DGv2GFRpBIQhb wQzMb958GU3TY0S+1VX0ySRDiMy7VWk+uNaiDJIQK65XfnwY+txjOS5r3VfNP6UN52yn 7MDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+h0WoIM0GD65cK906eJ1giltlZaSU/VsCeCwldoHsOg=; b=FX2O8DmJ2IOJPiNSSj2ypAScVGN6l22D4MHDqpieonyKoTOkVI/gC39sEzSgZD7TFq HPy6VLX0HWjiJlmg0rio2QkHw3/gJqUMhkgtLL2O4N5xjNNF42bkfTPv3DqsVs20/hru XTqMTBg8D7tOUDUQ2CQyAeDxLLtNaynJYqUYFsVJJebi/5oMv1XTiVpLizFUiecNm0ot tV3FbtzkdkpQ9Q3dyEgF+CMsOQsm03YXODkqU0bYh6iO7EBnfkQOli+FkkT5u9wsqQ82 1ch+SmhmLo7ysGgQJaVjG0LiT19IwYrwp5Dwa79XmImxzKZLBFfqjM4Qf6oqjZzgeslD fx2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=qAXQMW8E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020ac84802000000b0031eb18ef7ebsi6922150qtq.309.2022.07.19.09.16.35; Tue, 19 Jul 2022 09:16:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=qAXQMW8E; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238000AbiGSPwH (ORCPT + 99 others); Tue, 19 Jul 2022 11:52:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239326AbiGSPwB (ORCPT ); Tue, 19 Jul 2022 11:52:01 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D470B5F50 for ; Tue, 19 Jul 2022 08:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=+h0WoIM0GD65cK906eJ1giltlZaSU/VsCeCwldoHsOg=; b=qAXQMW8EOeD/uqldsIJVJlIcGm t626hE0k0nFaCJq44GByF/8jtj/QxuoThGeKDA00ZfPpRpUPTphNj0G2Vp06ec0ahVSOd1z68DEsY Ww22F3HI+MtlLAQ/LLXocnSWCs0iHEVtLvPhHfSDeFSnqyRPZj1pm+sRIbii6MMs1DTZ+ftc8tDbo 4FzvuMdXqcbL/Qi7/bcB5p125RMJh7huddmA0BtgRMyggCpybRyGScoxeqzeC7Har7ENHFfiENIdh 3/2WZPGxysuW7KHpSGeNjDHKkkoM6lyMWBD53lCSapWhedYLFIwyBIiWBHdxjdyyqmclH4btl/VCG ilB6t61w==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oDpVq-00AGSF-Od; Tue, 19 Jul 2022 15:51:54 +0000 Date: Tue, 19 Jul 2022 08:51:54 -0700 From: Christoph Hellwig To: Keir Fraser Cc: Christoph Hellwig , "Michael S. Tsirkin" , Jason Wang , kernel-team@android.com, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] virtio: Force DMA restricted devices through DMA API Message-ID: References: <20220719100256.419780-1-keirf@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 19, 2022 at 03:46:08PM +0000, Keir Fraser wrote: > However, if the general idea at least is acceptable, would the > implementation be acceptable if I add an explicit API for this to the > DMA subsystem, and hide the detail there? I don't think so. The right thing to key off is VIRTIO_F_ACCESS_PLATFORM, which really should be set in any modern virtio device after all the problems we had with the lack of it. > Or a completely different approach would be to revert the patch > e41b1355508d which clears VIRTIO_F_ACCESS_PLATFORM in the balloon > driver. MST: That's back in your court, as it's your patch! Which also means this needs to be addresses, but I don't think a simple revert is enough.