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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 289D9C76190 for ; Mon, 22 Jul 2019 15:48:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F337B2171F for ; Mon, 22 Jul 2019 15:48:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729697AbfGVPsG (ORCPT ); Mon, 22 Jul 2019 11:48:06 -0400 Received: from 8bytes.org ([81.169.241.247]:44866 "EHLO theia.8bytes.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727309AbfGVPsG (ORCPT ); Mon, 22 Jul 2019 11:48:06 -0400 Received: by theia.8bytes.org (Postfix, from userid 1000) id 8B0901F2; Mon, 22 Jul 2019 17:48:04 +0200 (CEST) Date: Mon, 22 Jul 2019 17:48:03 +0200 From: Joerg Roedel To: Rob Clark Cc: "list@263.net:IOMMU DRIVERS , Joerg Roedel ," , linux-arm-msm , aarch64-laptops@lists.linaro.org, Rob Clark , Will Deacon , Robin Murphy , Greg Kroah-Hartman , "Rafael J. Wysocki" , Rasmus Villemoes , Andy Shevchenko , Andrew Morton , Heikki Krogerus , Bartosz Golaszewski , Sudeep Holla , Joe Perches , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , Linux Kernel Mailing List Subject: Re: [PATCH v2] iommu: add support for drivers that manage iommu explicitly Message-ID: <20190722154803.GG12009@8bytes.org> References: <20190702202631.32148-2-robdclark@gmail.com> <20190710182844.25032-1-robdclark@gmail.com> <20190722142833.GB12009@8bytes.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 22, 2019 at 08:41:34AM -0700, Rob Clark wrote: > It is set by the driver: > > https://patchwork.freedesktop.org/patch/315291/ > > (This doesn't really belong in devicetree, since it isn't a > description of the hardware, so the driver is really the only place to > set this.. which is fine because it is about a detail of how the > driver works.) It is more a detail about how the firmware works. IIUC the problem is that the firmware initializes the context mappings for the GPU and the OS doesn't know anything about that and just overwrites them, causing the firmware GPU driver to fail badly. So I think it is the task of the firmware to tell the OS not to touch the devices mappings until the OS device driver takes over. On x86 there is something similar with the RMRR/unity-map tables from the firmware. Regards, Joerg