From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gordan Bobic Subject: Re: Nvidia GPU passthrough and Device IDs Date: Thu, 28 Nov 2013 11:29:49 +0000 Message-ID: <1c514247578d36d799ddccf57584d50e@mail.shatteredsilicon.net> References: <5297288D.4070301@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <5297288D.4070301@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper Cc: Xen-devel List List-Id: xen-devel@lists.xenproject.org On Thu, 28 Nov 2013 11:27:09 +0000, Andrew Cooper wrote: > On 28/11/13 11:21, Gordan Bobic wrote: >> This has recently come to my attention: >> >> http://www.nvidia.com/object/user-selectable-machines.html >> >> along with this snippet of information: >> >> - Physical Function PCIid: 10ed:11bf - GK104GL [GRID K2] >> - Virtual Function selectable from >> PCIid: 10ed:118b - GK104 [GeForce K2 USM] >> PCIid: 10ed:118c - GK104 [NVS K2 USM] >> PCIid: 10ed: 11b0 - GK104GL [Quadro K2 USM] >> PCIid: 10ed:11b1 - GK104GL [Tesla K2 USM] >> >> The way this reads to me is that it means that a different >> device ID is exposed to domU than what runs on the host. >> >> Therefore, it must be possible to change the device ID >> visible to domU to something other than what is visible >> on the host. >> >> So, as per a question that has recently been asked, is >> there a way to apply a software shim to expose a different >> device ID to the domU when doing PCI passthrough? This >> might completely avoid the need to modify the GeForce >> cards in ways discussed here recently to make them >> work in PCI passthrough mode by simply faking the >> device ID exposed. >> >> Gordan > > All config space accesses get vetted by Qemu or pcifront. > > We have had one bug for a particular graphics card with PCI > passthrough > which was fixed by faking up the wrong class code. (There was a > windows > XPDM/WDDM stack issue with the affected card, and the cirrus emulated > graphics card was detected as "better" than the passed-through one) I'll take that to be a resounding "yes" in answer to my question. :) Could you please point me in the rough direction of the code and process flow that handles this? Gordan