From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BCB4C4742C for ; Tue, 10 Nov 2020 12:55:00 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B0FE22065E for ; Tue, 10 Nov 2020 12:54:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=ffwll.ch header.i=@ffwll.ch header.b="E4HkumvR" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org B0FE22065E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E858F895C8; Tue, 10 Nov 2020 12:54:58 +0000 (UTC) Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by gabe.freedesktop.org (Postfix) with ESMTPS id EC7AC895C8 for ; Tue, 10 Nov 2020 12:54:56 +0000 (UTC) Received: by mail-wr1-x443.google.com with SMTP id d12so11038708wrr.13 for ; Tue, 10 Nov 2020 04:54:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=21NUxsor7hHh3PxftuxZky4lFBsZ7ois+WrBZ+IPnLY=; b=E4HkumvRbwuhozffvJJYhcXQ+VtG4Q5s+Lzoafw7cM2EbsdrTNVYk1kPivb8pbY7c+ I3kjvimorLUFRT9npgGtOPRUW7SmX6WyqftC9yyMCGkX+bhVlGtQOJkJpmTW1UQKJfWV ARuzsuE6jBqPKwT7KHW/FpzfKGO1l7WHVK6XU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=21NUxsor7hHh3PxftuxZky4lFBsZ7ois+WrBZ+IPnLY=; b=IkeyKlIO+WNSQ5ASV9ZJFsblmxzZdAZuMDH0etCQ1fOR7U52G5uo2nrq4+lIoL/xMj thiTThYe1xD78tbOHHuaC5vLjCJHfZZ7H46HCSupgPcybTUWcwCzqZ62cx71FMWKNpGL PlhrK2pAH6OeKOWTXyALUthmblnwOUd41qkYds0wgJ/KSklQ1fOyf47urGEUnWXKZZdJ uOrTaZlV05EcyxEgGDsE5kidI2TLmUkgILISZMwYYG1MhZEaEFmJHkO7avYMnF2tkUSA L2Up2SObn2wFNGXrLIijCDjJujC8IyzIJUkF4BbzP8NkVlZhbG1PO7ryVwrVkFn12ua6 XPsA== X-Gm-Message-State: AOAM532uAyH2ILo+EV+W2AdVC0HQ23HInQJI07GVHTPUVrWqrdEl2t4e PjGGahCJc9RtGeAAV8OlfYkdUA== X-Google-Smtp-Source: ABdhPJzT5dC6ywnGl2kTD3cDLIqcnE5q/gaqRflUh5l8yTN1U1ZZN6jf0KEM1LgGEsdInku+ZwePhw== X-Received: by 2002:adf:f546:: with SMTP id j6mr10751487wrp.219.1605012895642; Tue, 10 Nov 2020 04:54:55 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id 71sm17578577wrm.20.2020.11.10.04.54.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 Nov 2020 04:54:54 -0800 (PST) Date: Tue, 10 Nov 2020 13:54:52 +0100 From: Daniel Vetter To: Jason Gunthorpe Subject: Re: [PATCH] drm: remove pgprot_decrypted() before calls to io_remap_pfn_range() Message-ID: <20201110125452.GG401619@phenom.ffwll.local> References: <0-v1-2e6a0db57868+166-drm_sme_clean_jgg@nvidia.com> <20201105191746.GC401619@phenom.ffwll.local> <20201105193554.GP2620339@nvidia.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20201105193554.GP2620339@nvidia.com> X-Operating-System: Linux phenom 5.7.0-1-amd64 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tom Lendacky , linux-fbdev@vger.kernel.org, Thomas Zimmermann , Bartlomiej Zolnierkiewicz , David Airlie , dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Nov 05, 2020 at 03:35:54PM -0400, Jason Gunthorpe wrote: > On Thu, Nov 05, 2020 at 08:17:46PM +0100, Daniel Vetter wrote: > > On Thu, Nov 05, 2020 at 01:00:19PM -0400, Jason Gunthorpe wrote: > > > commit f8f6ae5d077a ("mm: always have io_remap_pfn_range() set > > > pgprot_decrypted()") moves the pgprot_decrypted() into > > > io_remap_pfn_range(). Delete any, now confusing, open coded calls that > > > directly precede io_remap_pfn_range(): > > > > > > - drm_io_prot() is only in drm_mmap_locked() to call io_remap_pfn_range() > > > > > > - fb_mmap() immediately calls vm_iomap_memory() which is a convenience > > > wrapper for io_remap_pfn_range() > > > > > > Signed-off-by: Jason Gunthorpe > > > drivers/gpu/drm/drm_vm.c | 3 --- > > > drivers/video/fbdev/core/fbmem.c | 5 ----- > > > 2 files changed, 8 deletions(-) > > > > > > rc3 will have the dependent patch, this should not be merged to DRM until it > > > has the rc3 commits. > > > > > > There are three other pgprot_decrypted() calls in DRM, I could not figure out > > > what was what there, but other than very special cases I would expect code to > > > use io_remap_pfn_range() instead. > > > > There's 4 now, I think linux-next added one. It's another io_remap_pfn > > > > Of the three you mentioned we have: > > - ttm and i915 use vm_insert_pfn (and ttm also can do also do pud_mkhuge > > entries) > > You can't insert IO memory with vmf_insert_pfn_pmd_prot() (it > doesn't set the special flag) so why does it need decrypted? Well, see the other thread, we do ... :-/ -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel