Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp68818ybk; Tue, 19 May 2020 15:46:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQlcOjK3XnMI2mjYqC5/wkct2cJzm2SKUNes5VHXuDuuC6XjPxCUA5xLaIgzFeJT0UmziC X-Received: by 2002:a17:907:447c:: with SMTP id oo20mr1271372ejb.385.1589928362304; Tue, 19 May 2020 15:46:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589928362; cv=none; d=google.com; s=arc-20160816; b=aLQiDZs5OWunSPGXdRXq4Vaa96vSHrnwXk0bE9e/nkft13VlyHc10Y91W1nQow6/Bs Obsy9GZ+dkyJmdx5nK2qJKZi+AyDAPD7UVXZmGmu1IkazBmixfhvnQ/MsE1534RFTK7D s/UVWtAMrq4+oecIY8AbGj6p/Jd27g5xuHl4XfdAheVZt1WothLgIc0Dn64iz5UCproE fHb4j5O4Sa8mNO6XuUlQVWKiXoOxXuJrxfaar95Vr3W6SLqpFNjBhTnduTXWP6x0ZrSl VcqIwqE75XUI9cdnQ3VYtSSxhafkFYN0dFRQ4NAxLTKOFVEsaxS2ooTryH5SnAdy1KfV I+LQ== 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=XkNEkulDdH4K6Pc2AjIHGc1nu83ozdPkLgankdo3z+8=; b=0QijgfAJQ+CtRM8llGO+jLEyCw9XehMSBPNBAo9UJmUMJBHHfGJQYSbcJ5sLSXNyDM IWMMqMQa38AKzouTAAg9BRX3PTHAiwdtZygz7Ja3DX17aWK6Ue3fPxXrNE2zm1ZMx+Gp UcDqy4XtuNgmw7A1iN1ZHVsokjF2bI3JMM/0Skx3qGPCm8bJDH+PD5uDVncnGRNyDfBT neaXlzcHTMTxgsB/ikPMYk8y3fB8Twlf3cW57Ah7W3IAnGLO5bQjQWg2KdlULZRxiqRV 6hAzMfT3MxoCyGO6FuY1bI0aKQmsOxHK7QBEYWl6ogbwhTMh1luawMQ1g5S7SRuDpbIR piUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=AweT9CPI; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q19si679465ejt.484.2020.05.19.15.45.39; Tue, 19 May 2020 15:46:02 -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=@gmail.com header.s=20161025 header.b=AweT9CPI; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728446AbgESWm5 (ORCPT + 99 others); Tue, 19 May 2020 18:42:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726064AbgESWm4 (ORCPT ); Tue, 19 May 2020 18:42:56 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3456DC061A0E; Tue, 19 May 2020 15:42:56 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id a2so881529ejb.10; Tue, 19 May 2020 15:42:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XkNEkulDdH4K6Pc2AjIHGc1nu83ozdPkLgankdo3z+8=; b=AweT9CPIrUxa0N4vmOK6oeo/RxnZYLc+CExt9z8FbB6GnMgeBCd0HEvdw8smURG8fg ejGoOvcyyG4x6E1LsYeAohAFISL1LexnmcLI17QeGLW30w7WSPiLSp9PTWtY2jxCxCfG T2LZQReOgUzOuD6RqkMr9W/oePZEfvsya+tZEwsqcIDTH93LLKWo/eYhSxAZmit3lexc VRq86Yrb2RMPQZx87PCOtd1hZ+2IxPd0JKJso1L/tLwVYWaCH1MxtKCEbFdwHQwReNAT GhAlb+w4vwOYm7cBfs+zGlldrJNucHi+c/0Omu1JZOKu0R/HdMfHM6Dqf1fWcIGwwETU yVeQ== 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=XkNEkulDdH4K6Pc2AjIHGc1nu83ozdPkLgankdo3z+8=; b=XaU1jhLE1SRbpBiJD1OF0Z1QNEEEMf+vE6DuHqsb3VORdGmlp9GKT9NVaQnsYSye/m wsvxIbwL2u4d3JSfQZ9cxW3tomVgSTPX050hzk+PtlSRGDwUBZMO5PWOJl7bm9S2bzjT z2upDf9yBcIZwsDvEd75/rWAh1fJVahTv7D7yhs46HreUaXOL/jejRW544r8ntvVAQ45 QuPb3wz+E7cKFv5gk+Gka5vcJxLHNsJNBLHnFCtYV8mYcHwypRwSfmk6MA1gap+khLTY IzGmqkKfvxnUgYAKYItRpTF0Az7vXI2GxCCp7kjNesSwlKyQ0PEAfHQE23beg0F9hgXY YqYw== X-Gm-Message-State: AOAM533h4nEXOSWhEsbZt3M4igiXyNm9w9jYsw7lV02fFbVNid89jG/E PkQW3C0cIRPoXsnYCZpWrRI1aKCtw+u5mDqmrjXjAcyt X-Received: by 2002:a17:906:404c:: with SMTP id y12mr1381799ejj.9.1589928174706; Tue, 19 May 2020 15:42:54 -0700 (PDT) MIME-Version: 1.0 References: <20200519163234.226513-1-sashal@kernel.org> In-Reply-To: <20200519163234.226513-1-sashal@kernel.org> From: Dave Airlie Date: Wed, 20 May 2020 08:42:43 +1000 Message-ID: Subject: Re: [RFC PATCH 0/4] DirectX on Linux To: Sasha Levin Cc: "Deucher, Alexander" , Chris Wilson , =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= , Hawking Zhang , "Ursulin, Tvrtko" , linux-hyperv@vger.kernel.org, sthemmin@microsoft.com, Greg Kroah-Hartman , haiyangz@microsoft.com, LKML , dri-devel , spronovo@microsoft.com, wei.liu@kernel.org, Linux Fbdev development list , iourit@microsoft.com, kys@microsoft.com 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, 20 May 2020 at 02:33, Sasha Levin wrote: > > There is a blog post that goes into more detail about the bigger > picture, and walks through all the required pieces to make this work. It > is available here: > https://devblogs.microsoft.com/directx/directx-heart-linux . The rest of > this cover letter will focus on the Linux Kernel bits. > > Overview > ======== > > This is the first draft of the Microsoft Virtual GPU (vGPU) driver. The > driver exposes a paravirtualized GPU to user mode applications running > in a virtual machine on a Windows host. This enables hardware > acceleration in environment such as WSL (Windows Subsystem for Linux) > where the Linux virtual machine is able to share the GPU with the > Windows host. > > The projection is accomplished by exposing the WDDM (Windows Display > Driver Model) interface as a set of IOCTL. This allows APIs and user > mode driver written against the WDDM GPU abstraction on Windows to be > ported to run within a Linux environment. This enables the port of the > D3D12 and DirectML APIs as well as their associated user mode driver to > Linux. This also enables third party APIs, such as the popular NVIDIA > Cuda compute API, to be hardware accelerated within a WSL environment. > > Only the rendering/compute aspect of the GPU are projected to the > virtual machine, no display functionality is exposed. Further, at this > time there are no presentation integration. So although the D3D12 API > can be use to render graphics offscreen, there is no path (yet) for > pixel to flow from the Linux environment back onto the Windows host > desktop. This GPU stack is effectively side-by-side with the native > Linux graphics stack. Okay I've had some caffiene and absorbed some more of this. This is a driver that connects a binary blob interface in the Windows kernel drivers to a binary blob that you run inside a Linux guest. It's a binary transport between two binary pieces. Personally this holds little of interest to me, I can see why it might be nice to have this upstream, but I don't forsee any other Linux distributor ever enabling it or having to ship it, it's purely a WSL2 pipe. I'm not saying I'd be happy to see this in the tree, since I don't see the value of maintaining it upstream, but it probably should just exists in a drivers/hyperv type area. Having said that, I hit one stumbling block: "Further, at this time there are no presentation integration. " If we upstream this driver as-is into some hyperv specific place, and you decide to add presentation integration this is more than likely going to mean you will want to interact with dma-bufs and dma-fences. If the driver is hidden away in a hyperv place it's likely we won't even notice that feature landing until it's too late. I would like to see a coherent plan for presentation support (not code, just an architectural diagram), because I think when you contemplate how that works it will change the picture of how this driver looks and intergrates into the rest of the Linux graphics ecosystem. As-is I'd rather this didn't land under my purview, since I don't see the value this adds to the Linux ecosystem at all, and I think it's important when putting a burden on upstream that you provide some value. Dave.