qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alex Williamson <alex.williamson@redhat.com>
To: Kevin O'Connor <kevin@koconnor.net>
Cc: seabios@seabios.org, Gerd Hoffmann <kraxel@redhat.com>,
	qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [SeaBIOS] [RFC PATCH v2] fw/pci: Add support for mapping Intel IGD OpRegion via QEMU
Date: Wed, 03 Feb 2016 16:52:33 -0700	[thread overview]
Message-ID: <1454543553.2989.3.camel@redhat.com> (raw)
In-Reply-To: <20160203220924.GA10055@morn.lan>

On Wed, 2016-02-03 at 17:09 -0500, Kevin O'Connor wrote:
> 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.

Comments we've seen from Intel suggest they prefer assigning IGD as a
secondary VGA device though, so the "active" VGA device might not be IGD
at all.  I'd also be surprised if QEMU ever sets an active VGA device
itself versus relying on SeaBIOS to do it via pci_enable_default_vga().
Then it seems like we get into the realm of QEMU needing to know in
advance how SeaBIOS' search algorithms work to know which is the "next"
device.  One thing in our favor, maybe, is that there can't be multiple
"etc/igd-opregion" fw_cfg files, QEMU will assert if that happens.  So
if we get to SeaBIOS and there are multiple Intel VGA devices, there can
only be at most one OpRegion for them and we can either give them all
the same or just use it on the first one we encounter.  We're probably
putting way too much thought into this scenario that Intel likely has no
expectation of supporting though ;)  Thanks,

Alex

  reply	other threads:[~2016-02-03 23:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 20:10 [Qemu-devel] [RFC PATCH v2] fw/pci: Add support for mapping Intel IGD OpRegion via QEMU Alex Williamson
2016-02-03  9:04 ` [Qemu-devel] [SeaBIOS] " Gerd Hoffmann
2016-02-03 19:43   ` Alex Williamson
2016-02-03 21:38     ` Alex Williamson
2016-02-03 22:09       ` Kevin O'Connor
2016-02-03 23:52         ` Alex Williamson [this message]
2016-02-04  7:52           ` Gerd Hoffmann
2016-02-04 16:01             ` Kevin O'Connor
2016-02-04 16:58 ` Igor Mammedov
2016-02-05  5:44   ` Alex Williamson
2016-02-05  7:58   ` Gerd Hoffmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1454543553.2989.3.camel@redhat.com \
    --to=alex.williamson@redhat.com \
    --cc=kevin@koconnor.net \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).