From: Ian Campbell Subject: Re: [PATCH v9 12/14] tools/libxl: read from config if passing through primary GPU Date: Thu, 3 Jul 2014 17:11:30 +0100 Message-ID: <1404403890.14796.1.camel@kazak.uk.xensource.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> <53B5901E0200007800020583@mail.emea.novell.com> <1404401156.10477.4.camel@kazak.uk.xensource.com> <53B594DF02000078000205EB@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53B594DF02000078000205EB@mail.emea.novell.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: Jan Beulich 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 Thu, 2014-07-03 at 16:37 +0100, Jan Beulich wrote: > >>> On 03.07.14 at 17:25, wrote: > > On Thu, 2014-07-03 at 16:17 +0100, Jan Beulich wrote: > >> >>> 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. > > > > Hrm, I'm not sure I see that happening any time soon... > > > > Given that the above class-based check has apparently been fine since > > however long could we live with it in the context of this series? > > As said on an earlier version of the series - this is tools code, so > ultimately you judge. I'm merely pointing out that we're apparently > spreading a pre-existing shortcoming. OK, IMHO given that it's totally orthogonal to the actual aim of the series and given that it is not making things worse nor backing us into a corner which we cannot get out we can live with it. So we can go with the PCI device class based check. Ian.