Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3808801pxk; Tue, 8 Sep 2020 03:07:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzqpYpUZKnjh6cuyNSADzfT6wZgbzGrO7LhjOlb6fHEFygrsMNdushe438xLCuvRPyhsUJW X-Received: by 2002:a17:906:6d92:: with SMTP id h18mr13488866ejt.405.1599559654146; Tue, 08 Sep 2020 03:07:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599559654; cv=none; d=google.com; s=arc-20160816; b=Y7JJkvJys4S2/cNK6zuKArH3hRExPb32/4ZAXGjr/ZyG6HvaYHYjfrI4nb0VLVGYq+ lHGgJL7tURGrCyELPkKaOaaIKAVR4l3QR7E2u/efzka6xR4aLBD9x8AA0DeNrVMi5pyq k+G5z2NQrNGHCCjKJDdqMqXV96Dc5wHlNpk0aNzbQRP5dxCQzg8K1wCu+QyOjo34icay 0DGg8tTzU/DbTgN6UmXyErxlyr/rGeUmkVdabq3cW4qB3EWt2rISSIltBlnL5LVV9Ctk tt52W2vdkTNh5LmYs3lXS5Gc/G2lQm7xJw0GFF1iFqva1qe8B1F2J+a0NUV5LY+WM8Ol 0YRg== 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:to:from:date :dkim-signature; bh=Al+jB21s8k4aRrKK14DGG1BWv7CsWudzcU2+kAwpAVw=; b=I5E+goabEovej6jxDGzUG6yNJPKqifDHrw9Ohl8PYtdEq5apVBCEX8GpkKyEq2Tcm3 yFEuxlk8hSu36LdsJtWyo017FiQxai5dm9ZjP8M2dEumvLip0Hp6xKnk9PbTZxAW3oYM Se0pylE7wXCniFWRt+m3+YEdybVzrWawm5Ui8QiS4UfKaBXKUOleVVOi6PwziiaUPsbB VQnmitljJfuL9NyF5fy9kcebg9pP6tCZ91kEVhhgybJ0F3he1j3IVMopIAOiXGee06k9 4sLA9plQm+O569rdNIBJXcn/8hwotUJGu/qWkFMrK9o5mGJZw3q8J/P4r0hzyY8gndcU nMVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GKsYAW9s; 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 dp16si15260935ejc.687.2020.09.08.03.07.11; Tue, 08 Sep 2020 03:07:34 -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=GKsYAW9s; 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 S1729124AbgIHKDE (ORCPT + 99 others); Tue, 8 Sep 2020 06:03:04 -0400 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:58063 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1729094AbgIHKDC (ORCPT ); Tue, 8 Sep 2020 06:03:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599559380; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Al+jB21s8k4aRrKK14DGG1BWv7CsWudzcU2+kAwpAVw=; b=GKsYAW9sCH8vs23An5AC3MGF/99uxsMlmOcc2JGUp0M8vUokYYtTjz+omsnbYtVOJf+99A sNJoR+6K7Lo82SV2cGeAL/p8jq1Zse344iPblh9PGvjWSmvOBIUHLmt+DExCAS7jTQUSV9 o3sLmmy8tGzXbbbrVAP1m1+QidT28yU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-37-22mgQBftORuwdHZCpB_IfA-1; Tue, 08 Sep 2020 06:02:59 -0400 X-MC-Unique: 22mgQBftORuwdHZCpB_IfA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id CA3531091060; Tue, 8 Sep 2020 10:02:55 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-56.ams2.redhat.com [10.36.112.56]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9C75B1002388; Tue, 8 Sep 2020 10:02:54 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id ACCE89D78; Tue, 8 Sep 2020 12:02:53 +0200 (CEST) Date: Tue, 8 Sep 2020 12:02:53 +0200 From: Gerd Hoffmann To: dri-devel , Christian =?utf-8?B?S8O2bmln?= , Alex Deucher , David Airlie , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Lucas Stach , Russell King , Christian Gmeiner , Rob Clark , Sean Paul , Ben Skeggs , Sandy Huang , Heiko =?utf-8?Q?St=C3=BCbner?= , Thierry Reding , Jonathan Hunter , Oleksandr Andrushchenko , "open list:RADEON and AMDGPU DRM DRIVERS" , open list , "moderated list:DRM DRIVERS FOR VIVANTE GPU IP" , "open list:DRM DRIVER FOR MSM ADRENO GPU" , "open list:DRM DRIVER FOR MSM ADRENO GPU" , "open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS" , "moderated list:ARM/Rockchip SoC support" , "open list:ARM/Rockchip SoC support" , "open list:DRM DRIVERS FOR NVIDIA TEGRA" , "moderated list:DRM DRIVERS FOR XEN" Subject: Re: [PATCH v4 1/1] drm: allow limiting the scatter list size. Message-ID: <20200908100253.b22sff23737l77bo@sirius.home.kraxel.org> References: <20200907112425.15610-1-kraxel@redhat.com> <20200907112425.15610-2-kraxel@redhat.com> <20200908054858.um34wojjv6uhi7d3@sirius.home.kraxel.org> <20200908085544.GI2352366@phenom.ffwll.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200908085544.GI2352366@phenom.ffwll.local> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > The comments I've found suggest very much not ... Or is that all very > > > old stuff only that no one cares about anymore? > > > > I think these days it is possible to override dma_ops per device, which > > in turn allows virtio to deal with the quirks without the rest of the > > kernel knowing about these details. > > > > I also think virtio-gpu can drop the virtio_has_dma_quirk() checks, just > > use the dma api path unconditionally and depend on virtio core having > > setup dma_ops in a way that it JustWorks[tm]. I'll look into that next. > > The comment above vring_use_dma_api() suggests that this has not yet > happened, that's why I'm asking. Hmm, wading through the code, seems it indeed happen yet, even though my testing didn't show any issues. Probably pure luck because devices and cpus have the same memory view on x86. Guess I need to try this on ppc64 to see it actually failing ... So dropping the virtio_has_dma_quirk() checks isn't going to fly. Using dma_max_mapping_size() should be fine though. It might use a lower limit than needed for virtio, but it should not break things. take care, Gerd