From: "Jan Beulich" Subject: Re: [PATCH v9 12/14] tools/libxl: read from config if passing through primary GPU Date: Thu, 03 Jul 2014 16:17:18 +0100 Message-ID: <53B5901E0200007800020583@mail.emea.novell.com> References: <1404326543-16875-1-git-send-email-avanzini.arianna@gmail.com> <1404326543-16875-13-git-send-email-avanzini.arianna@gmail.com> <1365773624.20140702210040@eikelenboom.it> <53B54CD502000078000201D1@mail.emea.novell.com> <1404399027.8683.14.camel@kazak.uk.xensource.com> <1404399235.8683.15.camel@kazak.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1404399235.8683.15.camel@kazak.uk.xensource.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: tim@xen.org, paolo.valente@unimore.it, keir@xen.org, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, dario.faggioli@citrix.com, Ian.Jackson@eu.citrix.com, xen-devel@lists.xen.org, julien.grall@citrix.com, Sander Eikelenboom , etrudeau@broadcom.com, Arianna Avanzini , viktor.kleinik@globallogic.com List-Id: xen-devel@lists.xenproject.org >>> On 03.07.14 at 16:53, wrote: > On Thu, 2014-07-03 at 15:50 +0100, Ian Campbell wrote: >> What specifically should Arianna be looking for? THe PCI device class or >> something else? > > Qemu-trad seems to use: > if ( !gfx_passthru || real_device->pci_dev->device_class != 0x0300 ) > return ret; > > Is that sufficient? I don't think so - I'd expect secondary cards to also be showing this class/sub-class (but I have no system with two or more cards where I could at least empirically check), i.e. that would only be sufficient when there's no upstream bridge. PCI_BRIDGE_CTL_VGA (on upstream bridges) and maybe (but unlikely) PCI_COMMAND_VGA_PALETTE (on the device itself and perhaps also upstream bridges) would seem to be the indicators. But I'm afraid this really needs to be properly answered by a PCI expert. Jan