Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp371151ybk; Wed, 20 May 2020 01:38:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7x+C6HigI7x/e9f6Bg7FHCYE3ar4dkK3jJcbR8QpIZNvyaRINv6HMqUCepLDH+yqqzq84 X-Received: by 2002:a17:906:18e9:: with SMTP id e9mr2724570ejf.140.1589963896131; Wed, 20 May 2020 01:38:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589963896; cv=none; d=google.com; s=arc-20160816; b=ZssmCRrr0fS7Nas0epTqiDfdL4D/yhA/pWbpt3LqG+nNtLh6C1A4WtuM64j8qCQTBp dOB9WRn8q6kV1A3JYCag1MT2kSg4oTxqsLfhPG6YxV5d1FmWahFvtPKpaprAVRraxnKf 0Go4wglLFI4Cgvq5Xg9bzPCd1rJ+9iygMValgQJGKmPE0dpZ4aSk7NLg3KHrsbE72K5C 6RlbsYWWjWz2X01AxmoB5fQFupyagjPmwSDzXate4qW8O2jb6yQNnvAWnQEl29A1Ae6K FOHFj3YwTppuO+7KJxXnaTwHUNNBCAoTfRZweCeOaw0zbwcf1hgPbcSlJQpuQRvBvd3v mRAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1L1JOS2/7OGTnjyzE28TzRr49jWHnoSPZa2y83NoajY=; b=mmId/JrZqZcrbEnqKRtIWtsGUBATddy4n9NKXB9RV/yRSAV398M8U9PXZr4dVorWxf iexB+NN2uUTZE3I8xWpss6YNbevnoSWuR60puMioUIxI1AeA8r+RpGzHdhlqYO4Lrzbc OW3wf2Kf64AVpdUWFh72RzrcE82Xd/+e8iCvDYWcb61kYqpBqLvaV5R1vOeWdkM2Y77G QrS2gSugYvHnmyO07DfL1NiJMeKpi//b4IIvTDJwANGh5pne8RPz4+/oUp9799PkiYa7 NUtaLjdcXfZG6/Jce/EKxJMHl7/vEtiksajCaYLYAqRNfcON5tdPukCRUUFfnJp0YlfN JtuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=Qn5uiJsI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si1317916ejs.266.2020.05.20.01.37.52; Wed, 20 May 2020 01:38:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ffwll.ch header.s=google header.b=Qn5uiJsI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726822AbgETIeb (ORCPT + 99 others); Wed, 20 May 2020 04:34:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57094 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726546AbgETIeb (ORCPT ); Wed, 20 May 2020 04:34:31 -0400 Received: from mail-oi1-x242.google.com (mail-oi1-x242.google.com [IPv6:2607:f8b0:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DB5FC061A0F for ; Wed, 20 May 2020 01:34:31 -0700 (PDT) Received: by mail-oi1-x242.google.com with SMTP id w4so2271801oia.1 for ; Wed, 20 May 2020 01:34:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=1L1JOS2/7OGTnjyzE28TzRr49jWHnoSPZa2y83NoajY=; b=Qn5uiJsI1CiTUY1rMY/hdjYr4HiyDhfSz/K8IUT9Ct0Li9bZDcjTdmeeXfA+hvr4ye La4sGIwutRbBBmkURH52DondGQmalrdmlRIin7Ill0HhbtbF6vFYpxeVZtTbZ9uc0pM2 QzWq0FNBS5CUP5cJj0ELZ9iBqOymG/dGQAeYg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1L1JOS2/7OGTnjyzE28TzRr49jWHnoSPZa2y83NoajY=; b=MC9V2aI8JHIPFki+c5+k3XbZxPM1lf9ITH4svwfmJNS1rCGoStPww8KNIE75NIbyXV jBo5lA5yQjqnnpvgFk4+cYGVXmv1uO3e33pQuQCrnQwx6GvFBSRghMecRJC5P9Df+kq2 z/ONMkSU6r/POYcYgbWLD/PJloBDpASA973KvdO7R0At+CyelaXRPIl/K8AH6tT1pZOQ hf9caq3B3uOiJtRF8clEy4bkHk+PXmoXiV75hMaJXTQ8btB+4I20NYtu1gdmRXvp9+bw XEV2tPyJ/bLEycSIs+V5cPjItD8GhroJYszXJX4GBE89ZRlqSa5TWGUvFw03TuxLZP1Q 9AQQ== X-Gm-Message-State: AOAM533vHBxXr0ohLbtVhMnMecBujR8yKS9tG2VakvS/SfsEGH/osEaU izDMc42rfEL5bD3IaJHF/5aDJhlSv+qrK05ousGVTg== X-Received: by 2002:a05:6808:282:: with SMTP id z2mr2215511oic.101.1589963670477; Wed, 20 May 2020 01:34:30 -0700 (PDT) MIME-Version: 1.0 References: <20200520051536.GA2141566@kroah.com> In-Reply-To: <20200520051536.GA2141566@kroah.com> From: Daniel Vetter Date: Wed, 20 May 2020 10:34:19 +0200 Message-ID: Subject: Re: [RFC PATCH 0/8] Qualcomm Cloud AI 100 driver To: Greg Kroah-Hartman Cc: dri-devel , Olof Johansson , Jason Gunthorpe , Jeffrey Hugo , Dave Airlie , Arnd Bergmann , Manivannan Sadhasivam , Bjorn Andersson , wufan@codeaurora.org, pratanan@codeaurora.org, linux-arm-msm , LKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 20, 2020 at 7:15 AM Greg Kroah-Hartman wrote: > > On Tue, May 19, 2020 at 10:41:15PM +0200, Daniel Vetter wrote: > > On Tue, May 19, 2020 at 07:41:20PM +0200, Greg Kroah-Hartman wrote: > > > On Tue, May 19, 2020 at 08:57:38AM -0600, Jeffrey Hugo wrote: > > > > On 5/18/2020 11:08 PM, Dave Airlie wrote: > > > > > On Fri, 15 May 2020 at 00:12, Jeffrey Hugo wrote: > > > > > > > > > > > > Introduction: > > > > > > Qualcomm Cloud AI 100 is a PCIe adapter card which contains a dedicated > > > > > > SoC ASIC for the purpose of efficently running Deep Learning inference > > > > > > workloads in a data center environment. > > > > > > > > > > > > The offical press release can be found at - > > > > > > https://www.qualcomm.com/news/releases/2019/04/09/qualcomm-brings-power-efficient-artificial-intelligence-inference > > > > > > > > > > > > The offical product website is - > > > > > > https://www.qualcomm.com/products/datacenter-artificial-intelligence > > > > > > > > > > > > At the time of the offical press release, numerious technology news sites > > > > > > also covered the product. Doing a search of your favorite site is likely > > > > > > to find their coverage of it. > > > > > > > > > > > > It is our goal to have the kernel driver for the product fully upstream. > > > > > > The purpose of this RFC is to start that process. We are still doing > > > > > > development (see below), and thus not quite looking to gain acceptance quite > > > > > > yet, but now that we have a working driver we beleive we are at the stage > > > > > > where meaningful conversation with the community can occur. > > > > > > > > > > > > > > > Hi Jeffery, > > > > > > > > > > Just wondering what the userspace/testing plans for this driver. > > > > > > > > > > This introduces a new user facing API for a device without pointers to > > > > > users or tests for that API. > > > > > > > > We have daily internal testing, although I don't expect you to take my word > > > > for that. > > > > > > > > I would like to get one of these devices into the hands of Linaro, so that > > > > it can be put into KernelCI. Similar to other Qualcomm products. I'm trying > > > > to convince the powers that be to make this happen. > > > > > > > > Regarding what the community could do on its own, everything but the Linux > > > > driver is considered proprietary - that includes the on device firmware and > > > > the entire userspace stack. This is a decision above my pay grade. > > > > > > Ok, that's a decision you are going to have to push upward on, as we > > > really can't take this without a working, open, userspace. > > > > Uh wut. > > > > So the merge criteria for drivers/accel (atm still drivers/misc but I > > thought that was interim until more drivers showed up) isn't actually > > "totally-not-a-gpu accel driver without open source userspace". > > > > Instead it's "totally-not-a-gpu accel driver without open source > > userspace" _and_ you have to be best buddies with Greg. Or at least > > not be on the naughty company list. Since for habanalabs all you > > wanted is a few test cases to exercise the ioctls. Not the entire > > userspace. > > Also, to be fair, I have changed my mind after seeing the mess of > complexity that these "ioctls for everyone!" type of pass-through > these kinds of drivers are creating. You were right, we need open > userspace code in order to be able to properly evaluate and figure out > what they are doing is right or not and be able to maintain things over > time correctly. > > So I was wrong, and you were right, my apologies for my previous > stubbornness. Awesome and don't worry, I'm pretty sure we've all been stubborn occasionally :-) From a drivers/gpu pov I think still not quite there since we also want to see the compiler for these programmable accelerator thingies. But just having a fairly good consensus that "userspace library with all the runtime stuff excluding compiler must be open" is a huge step forward. Next step may be that we (kernel overall, drivers/gpu will still ask for the full thing) have ISA docs for these programmable things, so that we can also evaluate that aspect and gauge how many security issues there might be. Plus have a fighting chance to fix up the security leaks when (post smeltdown I don't really want to consider this an if) someone finds a hole in the hw security wall. At least in drivers/gpu we historically have a ton of drivers with command checkers to validate what userspace wants to run on the accelerator thingie. Both in cases where the hw was accidentally too strict, and not strict enough. Cheers, Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch