Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp487492ybf; Fri, 28 Feb 2020 01:51:02 -0800 (PST) X-Google-Smtp-Source: APXvYqxIdJmzrHuZPP1ejd3me8A4HcoVU29D/HCjBPhZ/1Is8qNdTwcWru5gIklkwdbiURe6D994 X-Received: by 2002:a05:6830:2015:: with SMTP id e21mr2523686otp.106.1582883462646; Fri, 28 Feb 2020 01:51:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582883462; cv=none; d=google.com; s=arc-20160816; b=wy1ytQo5UMcFh67X2Tyr32Byek/eSl8Z3iYtBIVeWpY9eWpL08CZqXjsvx1sEatroJ KlaSudo1U5S9HUWqs+CpcJAfUiu30Xxys69Q2NRCPMsEoXGo6rpxZePN/KLr5LQ9zF2H w9uXLJcTBDajFtrv6GMuzN5QycW0sVfGOdad+5OF64RFt9l/Ds+APJTXvz0Oq24oWTLz NCAKPbcTX/ZVecyPo7IyGrQg26N/8MD7fi7HCCONVni3wvlJtfE4a0Pp65DPWopEs4im kz6JHjTWwB50VAXExeEituHIV+m55pDbFf0ANcDo1poxvyhqWlJLiEnv/r/wHlxPwKLg STBg== 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:cc:to:from:date :dkim-signature; bh=xaUE2NO4gGXPZu75rog8Ham7snpA9hfQBixkkzfUHPs=; b=MZq6YYPEC/UBpElZZ84DfChfyNHsh5SM6GzDrjsQovFqMYnEzqJtEyFmS1umEGgYGp 1VE5HlIjqvCdPsWtIvMX/gUcMcOTXdsKocP+rD1poK8ut4l+8DjGvrgRLOevAbp6uWfR Aneun7XEOvZjg7FtU5mbXbGRtxOG+onny5bQUHHjmTLuK9ABr/jr+osOT/lubBx1bsJK m9sFYztPCq+sLbwNMvcikit+GVuaIokW86QhFIlgDY+cb9oYR6lei6Xr0mDOlYn1AeH5 /rVJA/++RWjZoGAHkMTUTcnuPxF8MGU//+h2L6ICMpVf/3L+b9TajHTCMw0IzpIRVAGT 9xgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=i4x1Q60C; 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 p9si767717oth.91.2020.02.28.01.50.49; Fri, 28 Feb 2020 01:51:02 -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=i4x1Q60C; 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 S1726626AbgB1JtO (ORCPT + 99 others); Fri, 28 Feb 2020 04:49:14 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:54730 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726005AbgB1JtO (ORCPT ); Fri, 28 Feb 2020 04:49:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582883352; 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: in-reply-to:in-reply-to:references:references; bh=xaUE2NO4gGXPZu75rog8Ham7snpA9hfQBixkkzfUHPs=; b=i4x1Q60Ca4Obu6gDrq7DJ2Uss8M/aqc9TTSsmhY4/UIFHPBitwkEZ4KPD7tWt/XSvmoNM0 6bC26jEvR0kcU+pqRfOr7y6FNuxUQpkDIw3Mg5nlQHThV67Gc9ok5Ye+qMYh4kS7LFOy4v xb7++ex5PC70NKv0hZxV40uQqmAsHSY= 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-311-cDxzfgL2P66JhpQWm0MxKg-1; Fri, 28 Feb 2020 04:49:08 -0500 X-MC-Unique: cDxzfgL2P66JhpQWm0MxKg-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2953E8010E8; Fri, 28 Feb 2020 09:49:06 +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 8CF235E1AF; Fri, 28 Feb 2020 09:49:05 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 9412D17447; Fri, 28 Feb 2020 10:49:03 +0100 (CET) Date: Fri, 28 Feb 2020 10:49:03 +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: <20200228094903.g7yf73mtnbjyu4ez@sirius.home.kraxel.org> References: <20200226154752.24328-1-kraxel@redhat.com> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <78eb099e-020f-91d1-672e-15176bf12cd4@shipmail.org> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, > > Not clue about the others (lima, tiny, panfrost, v3d). Maybe they 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 display. > > cirrus bounces everything via blits to vram, so it should be ok without > > decrypted. I guess that implies we should make decrypted configurable. > > Decrypted here is clearly incorrect and violates the SEV spec, regardless of > a config option. > > 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. That leaves the question what to do about pgprot_writecombine(). Any comments from the driver maintainers (see first paragraph)? cheers, Gerd