Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1076617imu; Thu, 20 Dec 2018 09:42:29 -0800 (PST) X-Google-Smtp-Source: AFSGD/Vzl68vtPGbHypZ1TtIs5Sl9yoVAX9AVzLpexltTn66y3fpgcLjr5cV1ZYaNLV57mR64bFp X-Received: by 2002:a62:28c9:: with SMTP id o192mr25616618pfo.57.1545327749609; Thu, 20 Dec 2018 09:42:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545327749; cv=none; d=google.com; s=arc-20160816; b=yduopei5qPRQRenaI/1cxWUjReptMWT8vookM5WbzNpTysdQ3dD5u/7+n4d1fM9csN nqgiFrI/fzFUw7FRm0ktkskghGwQifAidUb1sZvDs/nE8XxfnNvQtRPZzggWk8KoZ00p 56fdCxrnq4NQhT7Xg1ZDeFB23MeYYNKBTURJkGvF/CJPmF130zlNZ8E7gaZSzIkzQsL0 5rVmXR3kBp+j2QipuQ1RxMxyC1kFrLhp6Wc7VV889q7mWbMngMaNu5BbYBh4iDLqemHW JLwRUc77wEkIbJgqdo7Pu2IeiDX7M+YDmSjKp38H2xsa/6JtFvjdoPN+JpVrYc3FNMqj YtDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xlP1es0E/CTI638jb51O8he5KmaEfgJt9PkANcyjU3g=; b=GxePucSj30ALg51XQH7h8tdYSH9KzluhqNmiCsqK7oOQJZF6w4NcXV8KqE45FJjPWx /joxcKWoPjmDo4vm9K2Nn5QQsjm40AsVksyql5tbzBcQLRtyg5teYtyJdn1DMgzeoKUA FKnYdux9s1MmPRPDdlHPN+YLKr7gGGptnfQPEY/k/CQJmi8Zil21yyptlDAinl5MUCXU mFpVka3MaRVwkUF6oWzXJYufh5sM8u0Eeif3yo00OXw4kW5fZ52UqAza9TJ4w8cvGNB/ egHoLCHbN2wh//5vX+iJorJx6Xb7pUTLmTyG676jy0ZsbQjjZSX3vUmiU+ZDQEEsLUvm rlhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=oRDDkOJW; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g32si17236222pgg.400.2018.12.20.09.42.12; Thu, 20 Dec 2018 09:42:29 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=oRDDkOJW; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388041AbeLTRjx (ORCPT + 99 others); Thu, 20 Dec 2018 12:39:53 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:59490 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730526AbeLTRjw (ORCPT ); Thu, 20 Dec 2018 12:39:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; 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:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=xlP1es0E/CTI638jb51O8he5KmaEfgJt9PkANcyjU3g=; b=oRDDkOJWpzAPLKWeA77FYj0CS HUNI2eP+1uUZC6AtOi5Hl7CdVhAkX+YfnSJxefY1LC6uMOSSkRttKoD/1x+o4RnXc0niNS0n86zoi 6WR4BZSgjflcoS9oDio47eqOsdY2As1ieaIl9fneGaSuIDoIee8E+I/u+02VUQ7vkGG931kkNqtvi WZGbZg+g7u1xS6Gd6kJajjJ90y5nel9tz/ironWn8I270eimHowAkRAUsfGAMEBRo+OfY1pw0kUAc iI5r8nKlk/e5SfV6tRyudC5V7qNR+X+F/DusFVXfs75NI1Qy3LSDFgwaeJ4jQaqqLnW9gnDF/feOh ZzxovbF7A==; Received: from hch by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1ga2IY-00075g-9x; Thu, 20 Dec 2018 17:39:50 +0000 Date: Thu, 20 Dec 2018 09:39:50 -0800 From: Christoph Hellwig To: Oleksandr Andrushchenko Cc: Christoph Hellwig , Noralf =?iso-8859-1?Q?Tr=F8nnes?= , xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, daniel.vetter@intel.com, jgross@suse.com, boris.ostrovsky@oracle.com, Oleksandr Andrushchenko Subject: Re: [PATCH] drm/xen-front: Make shmem backed display buffer coherent Message-ID: <20181220173950.GA19641@infradead.org> References: <20181127103252.20994-1-andr2000@gmail.com> <17640791-5306-f7e4-8588-dd39c14e975b@tronnes.org> <20181220153646.GA22997@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Dec 20, 2018 at 05:49:39PM +0200, Oleksandr Andrushchenko wrote: > This is the only patch [1], no series. And at the moment I think > there is nothing to review as I am not sure how to deal with those > shmem pages: this patch is rather to start a discussion on how shmem > pages can be flushed on ARM (the only workaround I have so far is > in this patch which uses DMA API). This is where I am looking for > some advice, so I can implement the patch the right way. shmem is basically page cache. So you need to use the DMA streaming API (dma_map_*) to map it for DMA. You need to make sure no one access the kernel mapping at the same time as you do DMA to it, so the pages should be locked. This is how the normal file system I/O path works.