Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp530384ybf; Fri, 28 Feb 2020 02:47:35 -0800 (PST) X-Google-Smtp-Source: APXvYqz3DdODQlQYMNqWBFK9f2oW3LX4Qv7VY36AZiICH9d7i4hDnWd4v7Yn00Dlb/Zzjv9n0rGa X-Received: by 2002:a9d:53c2:: with SMTP id i2mr2612406oth.43.1582886855359; Fri, 28 Feb 2020 02:47:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582886855; cv=none; d=google.com; s=arc-20160816; b=HQ4KJwGV8ZTwBgTS9fhkVQjqHrAdeGuXXrztpaDxwFuxL33o8YzAN18QcvUs3f9tD3 kkjMsXOthcJMbiVADBgRX7GN4g+xlJf2+wF7UjvKk1DIinckCFd//QRgwGt2AZxxLR6a VjdOpe7K8cpd5VJJNjsimvAM9puXqZ32dTIhYWrE3D9WKPwx/jCBUeRvK+XZ0k3+UAQ6 SKEQMRc2+T0VOwsRx0kZFGBpAEZEh1S0RQCCtrumFThtthE9kLs1QInrpaqSBjaTt8Zz kiRACABHB7THkLpyXp4k9oBbU2nKLBhy7f+0amNSQLPjATDArNqf1t11hyaHzKBkUTAR 024A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=B59A79M83EwSQHOZpqp/GkLsWWIw6R7Tgo1iAbDywp0=; b=PihGneRDQ8vHF9PAIs9Ehjasl6Vf4A9dEklqdllfNqM8jpmrRzxHBLjR1lf+OgqQCP b9OmpQfShIukZq2MhmUSnX5PJfEt7dk3GP5P/2ZzFV43LIVdkcYC8Kp3N/cJyIEtEd/E z/VVtXuZTK/5RlljhQPzYiHk3F/HDuHkyK1giHOFlAMgJE3pNQrksuOcyOb9APRdExLC Ro2wwNp6mgJrfRP+BBTIoP6Te29t1AnXHTlVARnz78fPcPJ+sAE0lUCKz41uSn3k2Ns2 666yQMJCn/BEK8p4hpdsTANhv6PuHgq3xufw/AWUDHvH78DWPWLbqWl7oEE8aZtoOIjU 44Cw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=S04X9B9L; 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 r3si1310320otp.292.2020.02.28.02.47.22; Fri, 28 Feb 2020 02:47:35 -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=S04X9B9L; 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 S1726673AbgB1KrB (ORCPT + 99 others); Fri, 28 Feb 2020 05:47:01 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:27258 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726063AbgB1KrB (ORCPT ); Fri, 28 Feb 2020 05:47:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582886819; 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=B59A79M83EwSQHOZpqp/GkLsWWIw6R7Tgo1iAbDywp0=; b=S04X9B9Lc+vWr9ndmISIpBQGelnF03/EDFP3JMKJTZ92XL+21klGTw5vtEdvtDiGvu5e2H iYrVLHcQgFhuzwRe9zRZ3Z9Tpa9U9cXuv5tdD1GbLzf4/9Njex+1lph32hZjJUegQsJAtL ++3ZpGh2W9IoG6mOVtKNMfwITBzs1Do= 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-321-q7F9n6CoPqOI_cy6lJ4W4Q-1; Fri, 28 Feb 2020 05:46:55 -0500 X-MC-Unique: q7F9n6CoPqOI_cy6lJ4W4Q-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 77382800D5E; Fri, 28 Feb 2020 10:46:53 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-150.ams2.redhat.com [10.36.116.150]) by smtp.corp.redhat.com (Postfix) with ESMTP id F3A5610027BA; Fri, 28 Feb 2020 10:46:52 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 325A917447; Fri, 28 Feb 2020 11:46:52 +0100 (CET) Date: Fri, 28 Feb 2020 11:46:52 +0100 From: Gerd Hoffmann To: Thomas =?utf-8?Q?Hellstr=C3=B6m_=28VMware=29?= Cc: dri-devel@lists.freedesktop.org, Guillaume.Gardet@arm.com, David Airlie , open list , gurchetansingh@chromium.org, tzimmermann@suse.de, yuq825@gmail.com, noralf@tronnes.org, robh@kernel.org Subject: Re: [PATCH v5 1/3] drm/shmem: add support for per object caching flags. Message-ID: <20200228104652.ev5mn3uyrca2xen6@sirius.home.kraxel.org> References: <20200226154752.24328-2-kraxel@redhat.com> <20200227075321.ki74hfjpnsqv2yx2@sirius.home.kraxel.org> <41ca197c-136a-75d8-b269-801db44d4cba@shipmail.org> <20200227105643.h4klc3ybhpwv2l3x@sirius.home.kraxel.org> <68a05ace-40bc-76d6-5464-2c96328874b9@shipmail.org> <20200227132137.irruicvlkxpdo3so@sirius.home.kraxel.org> <78eb099e-020f-91d1-672e-15176bf12cd4@shipmail.org> <20200228094903.g7yf73mtnbjyu4ez@sirius.home.kraxel.org> <99eea905-db5c-4e07-7b93-6de3482e02f7@shipmail.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <99eea905-db5c-4e07-7b93-6de3482e02f7@shipmail.org> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 28, 2020 at 10:54:54AM +0100, Thomas Hellstr=F6m (VMware) wro= te: > On 2/28/20 10:49 AM, Gerd Hoffmann wrote: > > Hi, > >=20 > > > > Not clue about the others (lima, tiny, panfrost, v3d). Maybe the= y use > > > > write-combine just because this is what they got by default from > > > > drm_gem_mmap_obj(). Maybe they actually need that. Trying to Cc= : > > > > maintainters (and drop stable@). > > > > virtio-gpu needs it, otherwise the host can't show the virtual di= splay. > > > > cirrus bounces everything via blits to vram, so it should be ok w= ithout > > > > decrypted. I guess that implies we should make decrypted configu= rable. > > > Decrypted here is clearly incorrect and violates the SEV spec, rega= rdless of > > > a config option. > > >=20 > > > The only correct way is currently to use dma_alloc_coherent() and > > > mmap_coherent() to allocate decrypted memory and then use the > > > pgprot_decrypted flag. > > Hmm, virtio-gpu uses the dma api to allow the host access the gem > > object. So I think I have to correct the statement above, if I > > understands things correctly the dma api will use (properly allocated= ) > > decrypted bounce buffers and the virtio-gpu shmem objects don't need > > pgprot_decrypted mappings. >=20 > Yes, that sounds more correct. I wonder whether the "pgprot_decrypted()= " > perhaps remains from mapping VRAM gem buffers... Commit 95cf9264d5f3 ("x86, drm, fbdev: Do not specify encrypted memory for video mappings") added it, then it was kept through various changes. cheers, Gerd