From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR5cF-0002qk-It for qemu-devel@nongnu.org; Wed, 03 Feb 2016 17:09:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aR5c7-0003W9-LL for qemu-devel@nongnu.org; Wed, 03 Feb 2016 17:09:33 -0500 Received: from mail-qk0-x243.google.com ([2607:f8b0:400d:c09::243]:34078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aR5c7-0003W5-GM for qemu-devel@nongnu.org; Wed, 03 Feb 2016 17:09:27 -0500 Received: by mail-qk0-x243.google.com with SMTP id u128so868683qkh.1 for ; Wed, 03 Feb 2016 14:09:27 -0800 (PST) Date: Wed, 3 Feb 2016 17:09:24 -0500 From: Kevin O'Connor Message-ID: <20160203220924.GA10055@morn.lan> References: <20160202201023.5353.65948.stgit@gimli.home> <1454490248.4967.51.camel@redhat.com> <1454528580.18969.10.camel@redhat.com> <1454535527.2989.1.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1454535527.2989.1.camel@redhat.com> Subject: Re: [Qemu-devel] [SeaBIOS] [RFC PATCH v2] fw/pci: Add support for mapping Intel IGD OpRegion via QEMU List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Alex Williamson Cc: seabios@seabios.org, Gerd Hoffmann , qemu-devel@nongnu.org On Wed, Feb 03, 2016 at 02:38:47PM -0700, Alex Williamson wrote: > On Wed, 2016-02-03 at 12:43 -0700, Alex Williamson wrote: > > On Wed, 2016-02-03 at 10:04 +0100, Gerd Hoffmann wrote: > > >   Hi, > > >   > > > > +static void intel_igd_opregion_setup(struct pci_device *dev, void *arg) > > > > +{ > > > > +    struct romfile_s *file = romfile_find("etc/igd-opregion"); > > >   > > > Is it possible to have multiple igd devices in a single machine? > > > So, should we include the pci address in the file name? > > >   > > > Guess not needed, it's chipset graphics after all ... > >  > > Hmm, I think that's probably a pretty good observation, we don't want to > > revisit this if vGPUs need/want an OpRegion or if Intel decides to start > > allowing more than one per system.  Either could pretty easily introduce > > multiple into a VM. > > Naming is always more complicated than it seems.  For anything other > than a root bus devices, the PCI address doesn't exist until SeaBIOS > enumerates devices and assigns bus numbers for bridges.  So unless we > want to provide a path to the device like ACPI defines, maybe we should > just stick with "etc/igd-opregion".  It seems easily extensible to add > more specific files later and default to this one if those aren't found. Perhaps a simpler solution is to just make sure "etc/igd-opregion" is only deployed for the "active" VGA device (ie, the device that is_pci_vga() returns true for). Looks like pci_enable_default_vga() already has code for something similar. -Kevin