Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp342227ybl; Wed, 11 Dec 2019 00:17:52 -0800 (PST) X-Google-Smtp-Source: APXvYqw0jvKDYZ6uC0FdJVMNLA1rYfaJujelfcqRjILU8bb828vwOfT0fx/UCuqQbHcbjarKPQx2 X-Received: by 2002:a05:6808:312:: with SMTP id i18mr1880670oie.44.1576052272477; Wed, 11 Dec 2019 00:17:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576052272; cv=none; d=google.com; s=arc-20160816; b=fSxxZzpGNab9/AwnmFhqskyLVVUZUd+9SoXk93Ch0+nI4PJ5RY9glsbqIK7PWlbOOI nn4Kv+Pt5EJIqeGcfbdi4c7PfzRz0b3O7PA88GWfZAdtxhPXFpzpikrxWslvv6P2yZUe kUGKgOKfLva3DaUFgmKTa/0CrrBh2oUySHJL+ZnM81feBfUfMuF9LtFlSSwUZ4lZdyVp 8HmPeTSYf3fkFPMvBVRMZEWZnkhvlNxRxL9NUnmuIxvWlzwH0vcmI5s3//qBchp+8zmc zW76q4bOdUSFUwhYrea+1wisTGa/QmXdjy5j/t1gSZhO4rdZBbGt1M2s6HfZlUEF5kBk aCkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:in-reply-to:mime-version:references :message-id:subject:cc:to:from:date:dkim-signature; bh=c9+eXVJvGhvjgCko5lAbFcvBiKAk1D5Fec1eKLqFyyY=; b=Yojfrp1pT+4YxTDqhz82+3ErnjsJLegLYzlgj6qG2H/NsI0yRWRYvGM4l+H17tLI25 sJmypVVQhDf/7ASJNIhD55rKqT0i7OakX/g4Ps7bhUOixbxz9zZHn2ewgn0DkIcQH9eL seUl9SSAX0UEATet9KYt/yHSGIDb/nxvow7pPnS+VXC2rR+w2hCE0L7iN9lal4rrO623 57SRBzuPARKomuSESZIyb+OyjpSszHjgDZW0M4D+uuhqJTxe3JcNgOrhNjvpbK6e17uH aMZb5ASknPMb+2PDUtFFRA4hhRJ32T5DM4Yvg2vpEmi7U5bdE6xR4iZZndWVugZgXYlW R6LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZXy6TgE6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id v1si633095otq.141.2019.12.11.00.17.40; Wed, 11 Dec 2019 00:17:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=ZXy6TgE6; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728104AbfLKIPw (ORCPT + 99 others); Wed, 11 Dec 2019 03:15:52 -0500 Received: from us-smtp-1.mimecast.com ([207.211.31.81]:31390 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726983AbfLKIPw (ORCPT ); Wed, 11 Dec 2019 03:15:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576052150; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=c9+eXVJvGhvjgCko5lAbFcvBiKAk1D5Fec1eKLqFyyY=; b=ZXy6TgE6/MJyjO7nN6qbTrAlargJ83+qMWK3YcWM1mN46Idt6Cah8TK+TIDJj73P9qCxx9 cXozvhshv9OB/Mk9u8hX95htVOYVcR0ZABMI71oXWgbfNHu9SNvZ1KfuniLmbH/IRzb0+i 9BJy7a8RaFLzjCKiN74l7qX8pHCo7e8= 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-403-wgVuXbNjO-abuQ7falBagA-1; Wed, 11 Dec 2019 03:15:47 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0942E911EA; Wed, 11 Dec 2019 08:15:45 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-67.ams2.redhat.com [10.36.116.67]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6DEB160BE1; Wed, 11 Dec 2019 08:15:43 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id AB48E16E05; Wed, 11 Dec 2019 09:15:41 +0100 (CET) Date: Wed, 11 Dec 2019 09:15:41 +0100 From: Gerd Hoffmann To: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org, David Airlie , open list , "open list:VIRTIO GPU DRIVER" , gurchetansingh@chromium.org Subject: Re: [PATCH] drm/virtio: fix mmap page attributes Message-ID: <20191211081541.ejofg4uxo6poss6v@sirius.home.kraxel.org> References: <20191210085759.14763-1-kraxel@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-MC-Unique: wgVuXbNjO-abuQ7falBagA-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > There's similar code in udl, [1] which still uses writecombine for > imported buffers. Virtio does not need this? virtio doesn't support dma-buf imports (yet). So no worries for now. Why pick writecombine for the imported buffer btw? It'll probably be correct for the majority of imports, but it still looks like a educated guess to me. What if you import from vgem? I guess we should either ... (1) Ask the exporting driver to handle things, simliar to how it is done for vmaps already, probably by calling dma_buf_mmap(), or (2) Refuse to mmap imported objects via drm api. > Aside from this, do you think we could handle all special cases within > shmem? Probably makes sense to teach shmem helpers about caching. cheers, Gerd