Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp5136281imw; Tue, 19 Jul 2022 22:34:21 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uaqTQKs1F/kF/z5b1TsBTvBIhVrjlCb3vobSdE3dEeBXwfbPNL0kOqO7jbV659Tdc4Y22+ X-Received: by 2002:a17:907:6d99:b0:72f:4633:65 with SMTP id sb25-20020a1709076d9900b0072f46330065mr9176874ejc.320.1658295261489; Tue, 19 Jul 2022 22:34:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658295261; cv=none; d=google.com; s=arc-20160816; b=y3kegqyKcG15ZpSxkoEhk7qJVnXtAccHOlnbWMjjlfbocDnW93mh88au1cnyiCZbaq hkkt4YgSWyzqYjW7vsuyt08tuUyAmCyPDKozkeCfcwod0RvD6+VqYigOdC6jiC2jAxHh Fi6vsghi3vSL9R1qMmATzo5WJHj2Wtcf0NPO6BPQLg9goN5tVfaaGru18RhBFG+/7Eme OURx8cuICBuaDZa8hLSBTDW6zlsf0IcSMM4VaKdiXB9Adf3yrrG1AWZ7z4BowBv68sRP Vchx2/ghvUrjDPVHdNt0FMOtL4FNV+5SZgVJB+eSC8Hipz7KhGqIZKJja/nrcDfMnymQ PRnw== 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=+Bj5xo3aBWzpgA1wxnI5L2KZvghnmty4TyKyCextdDY=; b=0YWsVrfxz2/rUhOjsYxbNmAetxHayk9FKjoEkLc6Cevy9IAiROLhVomzkqIh9hIvZw rMDoFOPSLeJmi22k2OIxh5eIwk/v9v5yt6S0mBX7jglYlDC33fSQROqxeD0uB5umKJ1R vt9hSpgO25Q2FsbHQGPjMqVrZknydqeDFu/J8EJYtU/m/IBttLYk+5wW76NMuyqbf8KU n09dAD0ILfCZEhqDQLjmjwW7El5Z0Oyg+nEibDL713LO/zklb7y8Bb/s0CrHFlk/FfS4 xxnShLMKTnd2euyD9yf6tqiTUEplyApmp/cW+L0Ytrgq1E58Gmtv1xs7w8U3TH53aQF+ MwiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=a71tPE5m; 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 s22-20020a1709067b9600b00722e1f93942si19531505ejo.333.2022.07.19.22.33.56; Tue, 19 Jul 2022 22:34:21 -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=a71tPE5m; 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 S229736AbiGTFQ5 (ORCPT + 99 others); Wed, 20 Jul 2022 01:16:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbiGTFQ4 (ORCPT ); Wed, 20 Jul 2022 01:16:56 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71CD522B3A for ; Tue, 19 Jul 2022 22:16:54 -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=+Bj5xo3aBWzpgA1wxnI5L2KZvghnmty4TyKyCextdDY=; b=a71tPE5mXeW3OOa6Ki61VNAFN7 qe6oaQig2z46CEFskkXRR2+vpeKovnxG7d+Zz/ha7q8DpJKBK70GyYUd4bZSZItK+gySP+6C0InhM FRV1Re1cCNyUOdMVH5c1ukvZAXbi+VZoMZl1ke8XjCyleZAJDa8j9FO1GrUBOP00V6kdOINqkAwm0 Ewg5La+ZbRE0MICgJ5S0JvF1Rr9zhjYHFg41vMyAd01Wd9FMGYFR5JLbTzTf1QV8DxhLaXtHPdMe1 4fQZxhdNitRhc3rtjftVw6Qcn/Kjk15Nj7T4NlmMGEKEHDxLqq2zFxzOsA3GLnqHmv+ck+xDgApYQ hz0iVRdQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1oE24l-000Sky-Qv; Wed, 20 Jul 2022 05:16:47 +0000 Date: Tue, 19 Jul 2022 22:16:47 -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 04:11:50PM +0000, Keir Fraser wrote: > Well here are two possible approaches: > > 1. Revert e41b1355508d outright. I'm not even sure what it would mean > for reported pages to go through IOMMU. And VIRTIO_F_ACCESS_PLATFORM > is no longer IOMMU-specific anyway. > > 2. Continue to clear the flag during virtio_balloon negotiation, but > remember that it was offered, and test for that in vring_use_dma_api() > as well as, or instead of, virtio_has_dma_quirk(). > > Do either of those appeal? I'll have to defer to people that actually understand the virtio_balloon code, because I haven't evey seriously looked at it.